1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

🎨 move widget templates to assets

This commit is contained in:
Flam3rboy 2021-06-22 20:58:17 +02:00
parent e525977981
commit 295fbabf0d
7 changed files with 2 additions and 1 deletions

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 726 B

After

Width:  |  Height:  |  Size: 726 B

View File

@ -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);
}

View File

@ -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));
});