-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.js
155 lines (147 loc) · 4.56 KB
/
admin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
/**
* @api {get} admin Get List
* @apiVersion 1.0.0
* @apiName GetAdminList
* @apiGroup Admin
*
* @apiDescription This will return a list of all admin users.
*
* @apiSuccess {Object[]} adminList Array of all admin users
* @apiSuccess {String} adminList.id The id
* @apiSuccess {String} adminList.mail The E-Mail Address of the admin user
* @apiSuccess {Object[]} adminList.roleList A array of all roles
* @apiSuccess {Int} adminList.roleList.id Role id (see full list at Appendix)
* @apiSuccess {String} adminList.roleList.name Role name
* @apiSuccess {Int} adminList.createStamp Unix time stamp of create time
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* "adminList": [
* {
* "id": "KAJFDA7GFTRE87FDS78F7",
* "mail": "[email protected]",
* "roleList": [
* {
* "id": "2",
* "name": "admin"
* },
* ...
* "createStamp": "1415637736",
* },
* ...
* ]
* }
*/
/**
* @api {post} admin Create
* @apiVersion 1.0.0
* @apiName PostAdmin
* @apiGroup Admin
*
* @apiDescription Create a admin user.
*
* @apiParam {String} mail The E-Mail Address of the admin user
* @apiParam {Object[]} roleList A array of all roles
* @apiParam {Int} roleList.id Role id (see full list at Appendix)
* @apiParam {String} roleList.name Role name
*
* @apiSuccess {String} id The id
* @apiSuccess {String} mail The E-Mail Address of the admin user
* @apiSuccess {Object[]} roleList A array of all roles
* @apiSuccess {Int} roleList.id Role id (see full list at Appendix)
* @apiSuccess {String} roleList.name Role name
* @apiSuccess {Int} createStamp Unix time stamp of create time
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* "id": "KAJFDA7GFTRE87FDS78F7",
* "mail": "[email protected]",
* "roleList": [
* {
* "id": "2",
* "name": "admin"
* },
* ...
* "createStamp": "1415637736",
* }
*/
/**
* @api {get} admin/:adminId Get
* @apiVersion 1.0.0
* @apiName GetAdmin
* @apiGroup Admin
*
* @apiDescription This will return a specific token.
*
* @apiParam {String} adminId The admin user id
*
* @apiSuccess {String} id The id
* @apiSuccess {String} mail The E-Mail Address of the admin user
* @apiSuccess {Object[]} roleList A array of all roles
* @apiSuccess {Int} roleList.id Role id (see full list at Appendix)
* @apiSuccess {String} roleList.name Role name
* @apiSuccess {Int} createStamp Unix time stamp of create time
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* "id": "KAJFDA7GFTRE87FDS78F7",
* "mail": "[email protected]",
* "roleList": [
* {
* "id": "2",
* "name": "admin"
* },
* ...
* "createStamp": "1415637736",
* }
*/
/**
* @api {put} admin/:adminId Update
* @apiVersion 1.0.0
* @apiName PutAdmin
* @apiGroup Admin
*
* @apiDescription Update a specific admin user.
*
* @apiParam {String} adminId The admin user id
* @apiParam {String} mail The E-Mail Address of the admin user
* @apiParam {Object[]} roleList A array of all roles
* @apiParam {Int} roleList.id Role id (see full list at Appendix)
* @apiParam {String} roleList.name Role name
*
* @apiSuccess {String} id The id
* @apiSuccess {String} mail The E-Mail Address of the admin user
* @apiSuccess {Object[]} roleList A array of all roles
* @apiSuccess {Int} roleList.id Role id (see full list at Appendix)
* @apiSuccess {String} roleList.name Role name
* @apiSuccess {Int} createStamp Unix time stamp of create time
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
* {
* "id": "KAJFDA7GFTRE87FDS78F7",
* "mail": "[email protected]",
* "roleList": [
* {
* "id": "2",
* "name": "admin"
* },
* ...
* "createStamp": "1415637736",
* }
*/
/**
* @api {delete} admin/:adminId Delete
* @apiVersion 1.0.0
* @apiName DeleteAdmin
* @apiGroup Admin
*
* @apiDescription Delete a specific admin user.
*
* @apiParam {String} adminId The admin user id
*
* @apiSuccessExample {json} Success-Response:
* HTTP/1.1 200 OK
*/