From 0495351641c22ed548b9e924146201d7d38077fd Mon Sep 17 00:00:00 2001 From: youyc22 Date: Mon, 14 Oct 2024 21:21:37 +0800 Subject: [PATCH] add router for avatar --- src/routes/static.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/routes/static.ts b/src/routes/static.ts index 26857a8b..6c358f21 100644 --- a/src/routes/static.ts +++ b/src/routes/static.ts @@ -51,6 +51,16 @@ router.get("/upload/*", async (req, res) => { } }); +//avatar +router.get("/avatar/*", async (req, res) => { + try{ + const sts = await getSTS(role === "anonymous" ? viewActions : generalActions , `avatar/*`); + return res.status(200).send(sts); + } catch (err) { + return res.status(500).send(err); + } +}); + router.get("/chat_record/:application_id/*", async (req, res) => { try{ if (role == 'student' || role == 'teacher') {