Fix bad permissions check in toggle endpoint
This commit is contained in:
parent
8d7e9bd93d
commit
3e01d3391a
@ -1,8 +1,9 @@
|
||||
export async function onRequestPost(context: RequestContext) {
|
||||
const { active } = context.data.body;
|
||||
const { permissions } = context.data.current_user;
|
||||
console.log(permissions)
|
||||
|
||||
if (!(permissions & (1 << 0)) || !(permissions & (1 << 11)))
|
||||
if (!(permissions & (1 << 0)) && !(permissions & (1 << 11)))
|
||||
return new Response('{"error":"Forbidden"}', {
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
|
Loading…
x
Reference in New Issue
Block a user