summary refs log tree commit diff
path: root/api/src/routes/users/@me
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-13 12:59:59 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-13 12:59:59 +0200
commit3715807cf7bc1745dc76c735bf7f4006faff350e (patch)
tree3d2b38a2c0889a6e5019c06ad150711237dff48f /api/src/routes/users/@me
parent:sparkles: server bundle (diff)
downloadserver-3715807cf7bc1745dc76c735bf7f4006faff350e.tar.xz
rename @fosscord/server-util to -> @fosscord/util
Diffstat (limited to 'api/src/routes/users/@me')
-rw-r--r--api/src/routes/users/@me/channels.ts7
-rw-r--r--api/src/routes/users/@me/delete.ts2
-rw-r--r--api/src/routes/users/@me/disable.ts2
-rw-r--r--api/src/routes/users/@me/guilds.ts14
-rw-r--r--api/src/routes/users/@me/index.ts2
-rw-r--r--api/src/routes/users/@me/relationships.ts7
6 files changed, 18 insertions, 16 deletions
diff --git a/api/src/routes/users/@me/channels.ts b/api/src/routes/users/@me/channels.ts
index a425a25f..db9f8832 100644
--- a/api/src/routes/users/@me/channels.ts
+++ b/api/src/routes/users/@me/channels.ts
@@ -8,10 +8,11 @@ import {
 	trimSpecial,
 	Channel,
 	DMChannel,
-	UserModel
-} from "@fosscord/server-util";
+	UserModel,
+	emitEvent
+} from "@fosscord/util";
 import { HTTPError } from "lambert-server";
-import { emitEvent } from "../../../util/Event";
+
 import { DmChannelCreateSchema } from "../../../schema/Channel";
 import { check } from "../../../util/instanceOf";
 
diff --git a/api/src/routes/users/@me/delete.ts b/api/src/routes/users/@me/delete.ts
index edda8e2d..f863237d 100644
--- a/api/src/routes/users/@me/delete.ts
+++ b/api/src/routes/users/@me/delete.ts
@@ -1,5 +1,5 @@
 import { Router, Request, Response } from "express";
-import { GuildModel, MemberModel, UserModel } from "@fosscord/server-util";
+import { GuildModel, MemberModel, UserModel } from "@fosscord/util";
 import bcrypt from "bcrypt";
 const router = Router();
 
diff --git a/api/src/routes/users/@me/disable.ts b/api/src/routes/users/@me/disable.ts
index 0e5b734e..2d3a9850 100644
--- a/api/src/routes/users/@me/disable.ts
+++ b/api/src/routes/users/@me/disable.ts
@@ -1,4 +1,4 @@
-import { UserModel } from "@fosscord/server-util";
+import { UserModel } from "@fosscord/util";
 import { Router, Response, Request } from "express";
 import bcrypt from "bcrypt";
 
diff --git a/api/src/routes/users/@me/guilds.ts b/api/src/routes/users/@me/guilds.ts
index 6528552b..a9b53b75 100644
--- a/api/src/routes/users/@me/guilds.ts
+++ b/api/src/routes/users/@me/guilds.ts
@@ -1,7 +1,7 @@
 import { Router, Request, Response } from "express";
-import { GuildModel, MemberModel, UserModel, GuildDeleteEvent, GuildMemberRemoveEvent, toObject } from "@fosscord/server-util";
+import { GuildModel, MemberModel, UserModel, GuildDeleteEvent, GuildMemberRemoveEvent, toObject, emitEvent } from "@fosscord/util";
 import { HTTPError } from "lambert-server";
-import { emitEvent } from "../../../util/Event";
+
 import { getPublicUser } from "../../../util/User";
 
 const router: Router = Router();
@@ -32,10 +32,10 @@ router.delete("/:id", async (req: Request, res: Response) => {
 		emitEvent({
 			event: "GUILD_DELETE",
 			data: {
-				id: guild_id,
+				id: guild_id
 			},
-			user_id: req.user_id,
-		} as GuildDeleteEvent),
+			user_id: req.user_id
+		} as GuildDeleteEvent)
 	]);
 
 	const user = await getPublicUser(req.user_id);
@@ -44,9 +44,9 @@ router.delete("/:id", async (req: Request, res: Response) => {
 		event: "GUILD_MEMBER_REMOVE",
 		data: {
 			guild_id: guild_id,
-			user: user,
+			user: user
 		},
-		guild_id: guild_id,
+		guild_id: guild_id
 	} as GuildMemberRemoveEvent);
 
 	return res.sendStatus(204);
diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts
index 7bd4a486..c073e78a 100644
--- a/api/src/routes/users/@me/index.ts
+++ b/api/src/routes/users/@me/index.ts
@@ -1,5 +1,5 @@
 import { Router, Request, Response } from "express";
-import { UserModel, toObject, PublicUserProjection } from "@fosscord/server-util";
+import { UserModel, toObject, PublicUserProjection } from "@fosscord/util";
 import { getPublicUser } from "../../../util/User";
 import { UserModifySchema } from "../../../schema/User";
 import { check } from "../../../util/instanceOf";
diff --git a/api/src/routes/users/@me/relationships.ts b/api/src/routes/users/@me/relationships.ts
index a8f03143..642ee5f9 100644
--- a/api/src/routes/users/@me/relationships.ts
+++ b/api/src/routes/users/@me/relationships.ts
@@ -5,11 +5,12 @@ import {
 	toObject,
 	RelationshipType,
 	RelationshipRemoveEvent,
-	UserDocument
-} from "@fosscord/server-util";
+	UserDocument,
+	emitEvent
+} from "@fosscord/util";
 import { Router, Response, Request } from "express";
 import { HTTPError } from "lambert-server";
-import { emitEvent } from "../../../util/Event";
+
 import { check, Length } from "../../../util/instanceOf";
 
 const router = Router();