This commit is contained in:
+1
-3
@@ -662,9 +662,7 @@ authRoutes.get('/profile/avatar', authRequired, async (c) => {
|
|||||||
return c.body(new Uint8Array(image.data!))
|
return c.body(new Uint8Array(image.data!))
|
||||||
})
|
})
|
||||||
|
|
||||||
authRoutes.get('/users/:userId/avatar', authRequired, async (c) => {
|
authRoutes.get('/users/:userId/avatar', async (c) => {
|
||||||
if (!requireAdmin(c.get('user'))) return c.json({ error: 'forbidden' }, 403)
|
|
||||||
|
|
||||||
const userId = c.req.param('userId')
|
const userId = c.req.param('userId')
|
||||||
const image = await findUserProfileImage(userId)
|
const image = await findUserProfileImage(userId)
|
||||||
if (!image) return c.body(null, 404)
|
if (!image) return c.body(null, 404)
|
||||||
|
|||||||
Reference in New Issue
Block a user