|
13 | 13 | #### 2. Audit Page
|
14 | 14 | #### 3. List Page
|
15 | 15 | #### 4. System Page
|
| 16 | +### Public |
| 17 | +#### 1. System Interface |
16 | 18 |
|
17 | 19 | ## Before
|
18 | 20 | #### All template use WebApi to deal the operate
|
|
255 | 257 | ##### Json Args:
|
256 | 258 | ###### `code` `int` `response code`
|
257 | 259 |
|
258 |
| -### List Page (Writing) |
| 260 | +### List Page |
259 | 261 | #### The list manage page use the path "/admin/list"
|
260 | 262 | #### Only Admin can request this interface
|
261 | 263 | #### Requests the public interface to get the list of blacklist songs and whitelist songs
|
262 | 264 | ##### `/api/list`
|
263 | 265 | #### Request for list operate:
|
264 | 266 | #### WebApi Interface Detail:
|
265 |
| -##### Path: `/api/` |
| 267 | +##### Path: `/api/admin/list` |
266 | 268 | ##### Method: `POST`
|
267 | 269 | ##### Args:
|
268 | 270 | ###### `token` `string` `user(admin operator) token`
|
269 | 271 | ###### `sid` `int` `id of this song(v.) event`
|
270 |
| -###### `operate` `string` `pass, abort and ignore` |
| 272 | +###### `operate` `string` `white, black, remove` |
| 273 | +##### Response Format: `Json` |
| 274 | +##### Json Args: |
| 275 | +###### `code` `int` `response code` |
| 276 | + |
| 277 | +### System Page |
| 278 | +#### The system control page use the path "/admin/system" |
| 279 | +#### Only Admin can request this interface |
| 280 | +#### Options: |
| 281 | +##### `notice` `string` `System Notice` |
| 282 | +##### `switcher` `bool` `Main switcher for the song function` |
| 283 | +##### `igTime` `bool` ``Main switcher to ignore the time limit` |
| 284 | +##### `timeRule` `list` `the timeRule setting` |
| 285 | +#### timeRule look like: |
| 286 | +``` [[6, "16:00:00", "23:59:59"], [0, "00:00:00", "8:00:00"]]``` |
| 287 | +#### 6 stand for Sat., and 0 stand for Sun. |
| 288 | +#### I dont know how to design the form, everything depends on you guys :D |
| 289 | +#### Get the setting now use the public interface: "System Interface" |
| 290 | +#### Save the setting operate: |
| 291 | +#### WebApi Interface Detail: |
| 292 | +##### Path: `/api/admin/system` |
| 293 | +##### Method: `POST` |
| 294 | +##### Args: |
| 295 | +###### `token` `string` `user(admin operator) token` |
| 296 | +###### `OPTION` `TYPE` `NOTICE` |
| 297 | +###### ```See the detail in options``` |
271 | 298 | ##### Response Format: `Json`
|
272 | 299 | ##### Json Args:
|
273 | 300 | ###### `code` `int` `response code`
|
| 301 | + |
| 302 | +## Public |
| 303 | +### System Interface |
| 304 | +#### Anybody can directly request this interface |
| 305 | +#### Get system setting |
| 306 | +##### WebApi Interface Detail: |
| 307 | +##### Path: `/api/system` |
| 308 | +##### Method: `GET` |
| 309 | +##### Args: `Nothing` |
| 310 | +##### Response Format: `Json` |
| 311 | +##### Json Args: |
| 312 | +###### `code` `int` `response code` |
| 313 | +###### `content` `dict` `dict of list, included whitelist and blacklist` |
| 314 | +##### Content Dict(content): |
| 315 | +##### `notice` `string` `System Notice` |
| 316 | +##### `switcher` `bool` `Main switcher for the song function` |
| 317 | +##### `igTime` `bool` ``Main switcher to ignore the time limit` |
| 318 | +##### `timeRule` `list` `the timeRule setting` |
| 319 | +#### List of time rule: |
| 320 | +##### `0` `Index` `Index` |
| 321 | +##### `1` `HH:MM:SS` `begin time` |
| 322 | +##### `2` `HH:MM:SS` `end time` |
0 commit comments