summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id/roles.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-02 21:31:44 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-02 21:31:44 +0200
commit4c4bc248a5456e95b11102ee293fc5e7b37a83fa (patch)
tree984b7b8c6528d3a1a4bddeb81a2101e6258906c3 /api/src/routes/guilds/#guild_id/roles.ts
parentMerge branch 'master' of https://github.com/fosscord/fosscord-api (diff)
downloadserver-4c4bc248a5456e95b11102ee293fc5e7b37a83fa.tar.xz
:bug: fix entity missing an id (replace .insert with new Entity().save)
Diffstat (limited to 'api/src/routes/guilds/#guild_id/roles.ts')
-rw-r--r--api/src/routes/guilds/#guild_id/roles.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/src/routes/guilds/#guild_id/roles.ts b/api/src/routes/guilds/#guild_id/roles.ts
index c3dd92dc..20ab0779 100644
--- a/api/src/routes/guilds/#guild_id/roles.ts
+++ b/api/src/routes/guilds/#guild_id/roles.ts
@@ -53,7 +53,7 @@ router.post("/", check(RoleModifySchema), async (req: Request, res: Response) =>
 	};
 
 	await Promise.all([
-		Role.insert(role),
+		new Role(role).save(),
 		emitEvent({
 			event: "GUILD_ROLE_CREATE",
 			guild_id,