User function changes

This commit is contained in:
Hri7566 2023-09-09 01:37:33 -04:00
parent 7cdcdcfa5a
commit 9da5e17587
1 changed files with 9 additions and 14 deletions

View File

@ -1,13 +1,6 @@
import { User } from "@prisma/client"; import { User } from "@prisma/client";
import { prisma } from "./prisma"; import { prisma } from "./prisma";
import { UserFlags } from "../util/types";
export interface UserFlags {
freeze_name: number;
"no chat rate limit": number;
chat_curse_1: number;
chat_curse_2: number;
override_id: string;
}
export async function createUser( export async function createUser(
_id: string, _id: string,
@ -33,12 +26,14 @@ export async function readUser(_id: string) {
if (!data) return null; if (!data) return null;
return { // return {
_id: data.id, // _id: data.id,
name: data.name, // name: data.name,
color: data.color, // color: data.color,
flags: data.flags // flags: data.flags
}; // };
return data;
} }
export async function updateUser( export async function updateUser(