fix: resolve ESLint errors — remove unused imports and dead code
This commit is contained in:
@@ -115,7 +115,6 @@ export const storageRoutes: FastifyPluginAsync = async (app) => {
|
||||
app.delete('/storage/folder-permissions/:id', { preHandler: [app.authenticate, app.requirePermission('files.delete')] }, async (request, reply) => {
|
||||
const { id } = request.params as { id: string }
|
||||
// Look up the permission to find which folder it belongs to
|
||||
const existing = await StoragePermissionService.listPermissions(app.db, id)
|
||||
// listPermissions takes folderId, we need to find by perm id — use removePermission which fetches first
|
||||
const perm = await StoragePermissionService.getPermissionById(app.db, id)
|
||||
if (!perm) return reply.status(404).send({ error: { message: 'Permission not found', statusCode: 404 } })
|
||||
|
||||
Reference in New Issue
Block a user