enzostvs HF staff commited on
Commit
752d7f4
β€’
1 Parent(s): 4e3f6c0

wrong condition

Browse files
src/routes/api/community/[id]/+server.ts CHANGED
@@ -159,7 +159,7 @@ export async function DELETE({ params, cookies }: RequestEvent) {
159
  }
160
  })
161
 
162
- if (gallery?.userId !== user.sub || !process?.env?.SECRET_HF_ADMIN?.includes(user?.sub) ) {
163
  return json({
164
  error: "You are not authorized to delete this gallery"
165
  }, { status: 401 })
 
159
  }
160
  })
161
 
162
+ if (gallery?.userId !== user.sub && !process?.env?.SECRET_HF_ADMIN?.includes(user?.sub)) {
163
  return json({
164
  error: "You are not authorized to delete this gallery"
165
  }, { status: 401 })