mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-07 21:51:56 +00:00
cdn: drop hash-addressed version of emojis route
This commit is contained in:
@@ -62,7 +62,7 @@ router.post("/:guild_id", multer.single("file"), async (req: Request, res: Respo
|
||||
});
|
||||
});
|
||||
|
||||
router.get("/:guild_id", cache, async (req: Request, res: Response) => {
|
||||
router.get("/:emoji_id", cache, async (req: Request, res: Response) => {
|
||||
let { guild_id } = req.params as { [key: string]: string };
|
||||
guild_id = guild_id.split(".")[0]; // remove .file extension
|
||||
const path = `${pathPrefix}/${guild_id}`;
|
||||
@@ -89,8 +89,6 @@ export const getAvatar = async (req: Request, res: Response) => {
|
||||
return res.send(file);
|
||||
};
|
||||
|
||||
router.get("/:guild_id/:hash", cache, getAvatar);
|
||||
|
||||
router.delete("/:guild_id/:id", async (req: Request, res: Response) => {
|
||||
if (req.headers.signature !== Config.get().security.requestSignature) throw new HTTPError("Invalid request signature");
|
||||
const { guild_id, id } = req.params as { [key: string]: string };
|
||||
|
||||
Reference in New Issue
Block a user