mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-23 02:13:00 +00:00
fix the build mistakes from yesternight
This commit is contained in:
1 parent
785544e1c8
commit
ec07a9f415
2 files changed
+20
-16
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user