fix: Remade perms

This commit is contained in:
2025-06-13 14:55:52 +02:00
parent 3ba7460eee
commit 2db19ee1e7
4 changed files with 48 additions and 31 deletions

View File

@@ -1,10 +1,11 @@
import { Perms } from "@/utility";
import mongoose, { Types, Schema } from "mongoose"
export interface IUser {
uname: string;
pass: string;
room?: string;
admin?: number;
admin?: Perms[];
locked?: boolean;
fname?: string;
surname?: string;
@@ -17,7 +18,7 @@ const userSchema = new Schema<IUser>({
uname: {type: String, required: true},
pass: {type: String, required: true, default: "$2y$10$wxDhf.XiXkmdKrFqYUEa0.F4Bf.pDykZaMmgjvyLyeRP3E/Xy0hbC"},
room: {type: String, default: ""},
admin: Number,
admin: [{type: String}],
locked: {type: Boolean, default: false},
fname: {type: String, default: ""},
surname: {type: String, default: ""},