From 74e431eaf78edf83d8b0b7a4d65e71300a7a42df Mon Sep 17 00:00:00 2001 From: Yichen You <125688164+youyc22@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:42:29 +0800 Subject: [PATCH] add router for avatar (#1451) --- 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') {