summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2023-03-25 18:04:32 -0400
committerPuyodead1 <puyodead@proton.me>2023-04-13 15:39:56 -0400
commitfd283f1d1567c54ec8ad4ea537117c91dc8ce476 (patch)
treeaf8e2fab7b6d3f1884edf5bce497682bcd693f8b /src/api
parentoapi: finish users (diff)
downloadserver-fd283f1d1567c54ec8ad4ea537117c91dc8ce476.tar.xz
oapi: voice regions
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/voice/regions.ts21
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..9fb58fbe 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: "GuildVoiceRegionsResponse",
+			},
+		},
+	}),
+	async (req: Request, res: Response) => {
+		res.json(await getVoiceRegions(getIpAdress(req), true)); //vip true?
+	},
+);
 
 export default router;