diff options
Diffstat (limited to 'src/api/routes/guilds/#guild_id/voice-states')
-rw-r--r-- | src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts b/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts index 791ac102..60c69075 100644 --- a/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts +++ b/src/api/routes/guilds/#guild_id/voice-states/#user_id/index.ts @@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import { route } from "@spacebar/api"; import { Channel, ChannelType, @@ -26,7 +27,6 @@ import { VoiceStateUpdateEvent, VoiceStateUpdateSchema, } from "@spacebar/util"; -import { route } from "@spacebar/api"; import { Request, Response, Router } from "express"; const router = Router(); @@ -34,7 +34,21 @@ const router = Router(); router.patch( "/", - route({ body: "VoiceStateUpdateSchema" }), + route({ + requestBody: "VoiceStateUpdateSchema", + responses: { + 204: {}, + 400: { + body: "APIErrorResponse", + }, + 403: { + body: "APIErrorResponse", + }, + 404: { + body: "APIErrorResponse", + }, + }, + }), async (req: Request, res: Response) => { const body = req.body as VoiceStateUpdateSchema; const { guild_id } = req.params; |