summary refs log tree commit diff
path: root/util
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-04-08 10:26:20 +0300
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-04-08 10:26:20 +0300
commitec07a9f415eb34eac2249c9fdaf0769f880717d1 (patch)
tree8c7826eca378f0fcd020a901c98890b822526b8d /util
parentUpdate index.ts (diff)
downloadserver-ec07a9f415eb34eac2249c9fdaf0769f880717d1.tar.xz
fix the build mistakes from yesternight
Diffstat (limited to 'util')
-rw-r--r--util/src/util/Rights.ts17
1 files changed, 8 insertions, 9 deletions
diff --git a/util/src/util/Rights.ts b/util/src/util/Rights.ts
index dedbfe30..35ad9514 100644
--- a/util/src/util/Rights.ts
+++ b/util/src/util/Rights.ts
@@ -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);
+}