summary refs log tree commit diff
path: root/src/routes
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-22 20:58:17 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-06-22 20:58:17 +0200
commit295fbabf0d4999320d70f4a11f7c435d232f0855 (patch)
tree17b646811eefbfaee5883556c06567d0ccfeb0c3 /src/routes
parentMerge pull request #157 from Umimaso/widget (diff)
downloadserver-295fbabf0d4999320d70f4a11f7c435d232f0855.tar.xz
:art: move widget templates to assets
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/guilds/#guild_id/widget.png.ts2
-rw-r--r--src/routes/users/@me/index.ts1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/routes/guilds/#guild_id/widget.png.ts b/src/routes/guilds/#guild_id/widget.png.ts
index 3ddccf20..ea947c5d 100644
--- a/src/routes/guilds/#guild_id/widget.png.ts
+++ b/src/routes/guilds/#guild_id/widget.png.ts
@@ -35,7 +35,7 @@ router.get("/", async (req: Request, res: Response) => {
 	const sizeOf = require("image-size");
 
 	// TODO: Widget style templates need Fosscord branding
-	const source = path.join(__dirname, "..", "..", "..", "..", "cache","widget", `${style}.png`)
+	const source = path.join(__dirname, "..", "..", "..", "..", "assets","widget", `${style}.png`)
 	if (!fs.existsSync(source)) {
 		throw new HTTPError("Widget template does not exist.", 400);
 	}
diff --git a/src/routes/users/@me/index.ts b/src/routes/users/@me/index.ts
index 4f17fbee..df477ef1 100644
--- a/src/routes/users/@me/index.ts
+++ b/src/routes/users/@me/index.ts
@@ -29,6 +29,7 @@ router.patch("/", check(UserModifySchema), async (req: Request, res: Response) =
 	}
 
 	const user = await UserModel.findOneAndUpdate({ id: req.user_id }, body).exec();
+	// TODO: dispatch user update event
 
 	res.json(toObject(user));
 });