diff options
Diffstat (limited to '')
-rw-r--r-- | src/api/routes/guilds/#guild_id/roles/index.ts | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/api/routes/guilds/#guild_id/roles/index.ts b/src/api/routes/guilds/#guild_id/roles/index.ts index 17f0b5e9..9791f7a9 100644 --- a/src/api/routes/guilds/#guild_id/roles/index.ts +++ b/src/api/routes/guilds/#guild_id/roles/index.ts @@ -1,21 +1,18 @@ -import { Request, Response, Router } from "express"; +import { route } from "@fosscord/api"; import { - Role, + Config, + DiscordApiErrors, + emitEvent, getPermission, - Member, GuildRoleCreateEvent, GuildRoleUpdateEvent, - GuildRoleDeleteEvent, - emitEvent, - Config, - DiscordApiErrors, - handleFile, + Member, + OrmUtils, + Role, RoleModifySchema, RolePositionUpdateSchema } from "@fosscord/util"; -import { HTTPError } from "@fosscord/util"; -import { route } from "@fosscord/api"; -import { OrmUtils } from "@fosscord/util"; +import { Request, Response, Router } from "express"; const router: Router = Router(); @@ -38,7 +35,7 @@ router.post("/", route({ body: "RoleModifySchema", permission: "MANAGE_ROLES" }) if (role_count > maxRoles) throw DiscordApiErrors.MAXIMUM_ROLES.withParams(maxRoles); - let role: Role = OrmUtils.mergeDeep(new Role(),{ + let role: Role = OrmUtils.mergeDeep(new Role(), { // values before ...body are default and can be overriden position: 0, hoist: false, |