🎨 move widget templates to assets
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 726 B |
@ -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);
|
||||
}
|
||||
|
@ -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));
|
||||
});
|
||||
|