1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 10:52:31 +01:00

Format changed files

This commit is contained in:
LachlanCourt 2022-07-05 01:23:54 +10:00 committed by Erkin Alp Güney
parent 078c87ae17
commit d47c0d6a82

View File

@ -1,20 +1,13 @@
import { Router, Request, Response } from "express";
import {
Role,
Member,
GuildRoleUpdateEvent,
GuildRoleDeleteEvent,
emitEvent,
handleFile
} from "@fosscord/util";
import { Role, Member, GuildRoleUpdateEvent, GuildRoleDeleteEvent, emitEvent, handleFile } from "@fosscord/util";
import { route } from "@fosscord/api";
import { HTTPError } from "lambert-server";
import {RoleModifySchema} from '../'
import { RoleModifySchema } from "../";
const router = Router();
router.get("/",route({}), async (req: Request, res: Response) => {
const { guild_id, role_id } = req.params
router.get("/", route({}), async (req: Request, res: Response) => {
const { guild_id, role_id } = req.params;
await Member.IsInGuildOrFail(req.user_id, guild_id);
const role = await Role.findOneOrFail({ guild_id, id: role_id });
return res.json(role);