Skip to content

Commit

Permalink
add router for avatar (#1451)
Browse files Browse the repository at this point in the history
  • Loading branch information
youyc22 authored Oct 14, 2024
1 parent d92c95e commit 74e431e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/routes/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 74e431e

Please sign in to comment.