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:
parent
078c87ae17
commit
d47c0d6a82
@ -1,20 +1,13 @@
|
|||||||
import { Router, Request, Response } from "express";
|
import { Router, Request, Response } from "express";
|
||||||
import {
|
import { Role, Member, GuildRoleUpdateEvent, GuildRoleDeleteEvent, emitEvent, handleFile } from "@fosscord/util";
|
||||||
Role,
|
|
||||||
Member,
|
|
||||||
GuildRoleUpdateEvent,
|
|
||||||
GuildRoleDeleteEvent,
|
|
||||||
emitEvent,
|
|
||||||
handleFile
|
|
||||||
} from "@fosscord/util";
|
|
||||||
import { route } from "@fosscord/api";
|
import { route } from "@fosscord/api";
|
||||||
import { HTTPError } from "lambert-server";
|
import { HTTPError } from "lambert-server";
|
||||||
import {RoleModifySchema} from '../'
|
import { RoleModifySchema } from "../";
|
||||||
|
|
||||||
const router = Router();
|
const router = Router();
|
||||||
|
|
||||||
router.get("/", route({}), async (req: Request, res: Response) => {
|
router.get("/", route({}), async (req: Request, res: Response) => {
|
||||||
const { guild_id, role_id } = req.params
|
const { guild_id, role_id } = req.params;
|
||||||
await Member.IsInGuildOrFail(req.user_id, guild_id);
|
await Member.IsInGuildOrFail(req.user_id, guild_id);
|
||||||
const role = await Role.findOneOrFail({ guild_id, id: role_id });
|
const role = await Role.findOneOrFail({ guild_id, id: role_id });
|
||||||
return res.json(role);
|
return res.json(role);
|
||||||
|
Loading…
Reference in New Issue
Block a user