fix the build mistakes from yesternight

This commit is contained in:
Erkin Alp Güney
2022-04-08 10:26:20 +03:00
parent a8bd754d0c
commit 6482b112c4
2 changed files with 20 additions and 16 deletions
+8 -9
View File
@@ -87,15 +87,14 @@ export class Rights extends BitField {
throw new HTTPError(`You are missing the following rights ${permission}`, 403);
}
export async function getRight(
user_id: string,
/** opts: {
in_behalf?: (keyof User)[];
} = {} **/)
{
user = await User.findOneOrFail({ where: { id: user_id } });
return new Rights(user.right);
}
}
const ALL_RIGHTS = Object.values(Rights.FLAGS).reduce((total, val) => total | val, BigInt(0));
export async function getRights( user_id: string
/**, opts: {
in_behalf?: (keyof User)[];
} = {} **/) {
let user = await User.findOneOrFail({ where: { id: user_id } });
return new Rights(user.rights);
}