diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-07-28 08:24:15 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-07-28 08:24:15 +1000 |
commit | 8a3989c29776ad7eba8077bf7cc9c56e28b9b8c3 (patch) | |
tree | e71d68052e6bf5ddfad64c643a8fb2d04c2e183c /src/api/routes/voice/regions.ts | |
parent | Merge branch 'master' into feat/refactorIdentify (diff) | |
parent | Merge pull request #1075 from SpecificProtagonist/get_messages_around (diff) | |
download | server-8a3989c29776ad7eba8077bf7cc9c56e28b9b8c3.tar.xz |
Merge branch 'master' into feat/refactorIdentify
Diffstat (limited to 'src/api/routes/voice/regions.ts')
-rw-r--r-- | src/api/routes/voice/regions.ts | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/api/routes/voice/regions.ts b/src/api/routes/voice/regions.ts index 59bac07f..10a8b21d 100644 --- a/src/api/routes/voice/regions.ts +++ b/src/api/routes/voice/regions.ts @@ -16,14 +16,23 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { Router, Request, Response } from "express"; -import { getIpAdress, route } from "@spacebar/api"; -import { getVoiceRegions } from "@spacebar/api"; +import { getIpAdress, getVoiceRegions, route } from "@spacebar/api"; +import { Request, Response, Router } from "express"; const router: Router = Router(); -router.get("/", route({}), async (req: Request, res: Response) => { - res.json(await getVoiceRegions(getIpAdress(req), true)); //vip true? -}); +router.get( + "/", + route({ + responses: { + 200: { + body: "APIGuildVoiceRegion", + }, + }, + }), + async (req: Request, res: Response) => { + res.json(await getVoiceRegions(getIpAdress(req), true)); //vip true? + }, +); export default router; |