diff --git a/docs/admin_api.md b/docs/admin_api.md index 7e0ea31..c2724a6 100644 --- a/docs/admin_api.md +++ b/docs/admin_api.md @@ -45,3 +45,30 @@ Mark a voice region as deprecated. Disables any voice actions on guilds that are using the voice region. Returns empty body with 204 status code on success. + +## Guilds + +### GET `/guilds/` + +Returns a partial guild object. + +## Guild features + +### PATCH `/guilds//features` + +Patch the entire features list. Returns the new feature list following the same +structure as the input. + +| field | type | description | +| --: | :-- | :-- | +| features | List[string] | new list of features | + +### PUT `/guilds//features` + +Insert features. Receives and returns the same structure as +PATCH `/guilds//features`. + +### DELETE `/guilds//features` + +Remove features. Receives and returns the same structure as +PATCH `/guilds//features`. diff --git a/litecord/blueprints/admin_api/features.py b/litecord/blueprints/admin_api/features.py index 81d5099..69b338f 100644 --- a/litecord/blueprints/admin_api/features.py +++ b/litecord/blueprints/admin_api/features.py @@ -94,8 +94,8 @@ async def insert_features(guild_id: int): return await _features(guild_id) -@bp.route('//', methods=['DELETE']) -async def remove_feature(guild_id: int): +@bp.route('//features', methods=['DELETE']) +async def remove_features(guild_id: int): """Remove a feature from a guild""" await admin_check() to_remove = await _features_from_req()