oapi: voice regions
This commit is contained in:
parent
860b9d583e
commit
fd283f1d15
@ -7175,8 +7175,15 @@
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": "No description available"
|
||||
"200": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/GuildVoiceRegionsResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user