generated from Kan-A-Pesh/express-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
df3a5d3
commit cf47c50
Showing
1 changed file
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
# Admin endpoints | ||
|
||
Base url is `https://api-cova-dev.404devinci.fr/admin` | ||
|
||
## Clubs | ||
|
||
### GET /clubs | ||
|
||
No additional data. | ||
|
||
### POST /clubs | ||
|
||
Body: | ||
|
||
```json | ||
{ | ||
"name": "string", | ||
"avatarUrl": "string", | ||
"description": "string (optional)", | ||
"dailyDate": "string (optional)" | ||
} | ||
``` | ||
|
||
Note: If `dailyDate` is not provided, the club will be created with a daily date of today. | ||
|
||
### PUT /clubs/:id | ||
|
||
Params: | ||
|
||
- `id`: number | ||
|
||
Body: | ||
|
||
```json | ||
{ | ||
"name": "string (optional)", | ||
"avatarUrl": "string (optional)", | ||
"description": "string (optional)", | ||
"dailyDate": "string (optional)" | ||
} | ||
``` | ||
|
||
### DELETE /clubs/:id | ||
|
||
Params: | ||
|
||
- `id`: number | ||
|
||
## Challenges | ||
|
||
### GET /challenges | ||
|
||
No additional data. | ||
|
||
### POST /challenges | ||
|
||
Body: | ||
|
||
```json | ||
{ | ||
"clubId": "number", | ||
"score": "number", | ||
"name": "string" | ||
} | ||
``` | ||
|
||
### PUT /challenges/:id | ||
|
||
Params: | ||
|
||
- `id`: number | ||
|
||
Body: | ||
|
||
```json | ||
{ | ||
"score": "number", | ||
"name": "string" | ||
} | ||
``` | ||
|
||
### DELETE /challenges/:id | ||
|
||
Params: | ||
|
||
- `id`: number | ||
|
||
## Granters | ||
|
||
### GET /granters | ||
|
||
Query: | ||
|
||
- `clubId`: number (optional) | ||
|
||
Note: List all granters when no `clubId` is provided, otherwise list granters for the specified `clubId`. | ||
|
||
### POST /granters | ||
|
||
Body: | ||
|
||
```json | ||
{ | ||
"clubId": "number", | ||
"email": "string" | ||
} | ||
``` | ||
|
||
### DELETE /granters/:id | ||
|
||
## Dump | ||
|
||
### GET /dump | ||
|
||
No additional data. | ||
|
||
### POST /dump | ||
|
||
Body: | ||
|
||
```json | ||
{ | ||
"type": "acquired" | "challenges" | "clubs" | "granters" | "users", | ||
"data": "string" | ||
} | ||
``` | ||
|
||
## Notification | ||
|
||
### POST /notification | ||
|
||
Body: | ||
|
||
```json | ||
{ | ||
"title": "string", | ||
"message": "string", | ||
"iconUrl": "string (optional)" | ||
} | ||
``` |