From 9ed0b8e03fe48312571f93ea3615c850ec7dbc7b Mon Sep 17 00:00:00 2001 From: zkldi Date: Wed, 13 Oct 2021 17:40:19 +0100 Subject: [PATCH] Document new admin endpoints. --- docs/docs/api/routes/admin.md | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/docs/docs/api/routes/admin.md b/docs/docs/api/routes/admin.md index 25aeed0e9..310ffa002 100644 --- a/docs/docs/api/routes/admin.md +++ b/docs/docs/api/routes/admin.md @@ -38,4 +38,53 @@ POST /api/v1/admin/change-log-level #### Response -Empty Object. \ No newline at end of file +Empty Object. + +***** + +## Remove the isPrimary status from a chart + +This also uncalcs all score data for scores on the chart. + +`POST /api/v1/admin/deprimarify` + +### Permissions + +- Admin + +### Parameters + +| Property | Type | Description | +| :: | :: | :: | +| `chartID` | String | The chartID to deprimarify. | +| `game` | Game | The game this chart is on. | +| `songID` | Integer | Alternatively to chartID, you can specify this to deprimarify all charts on this songID. | + +### Response + +| Property | Type | Description | +| :: | :: | :: | +| `charts` | Array<ChartDocument> | The array of charts that were deprimarified | + +***** + +## Delete any Score + +This performs all the necessary checks to remove a score document aswell + +`POST /api/v1/admin/delete-score` + +### Permissions + +- Admin + +### Parameters + +| Property | Type | Description | +| :: | :: | :: | +| `scoreID` | String | The scoreID to delete. | + +### Response + +Empty Object. +