mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
lol
This commit is contained in:
parent
07fb93a4e6
commit
e3815e5c3e
@ -1,7 +1,9 @@
|
||||
import { Router, Request, Response } from "express";
|
||||
import { UserModel} from "@fosscord/server-util";
|
||||
import { UserModel, toObject } from "@fosscord/server-util";
|
||||
import { getPublicUser } from "../../../util/User";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { UserUpdateSchema } from "../../../schema/User";
|
||||
import { check } from "../../../util/instanceOf";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
@ -14,5 +16,4 @@ router.get("/", async (req: Request, res: Response) => {
|
||||
});
|
||||
|
||||
|
||||
|
||||
export default router;
|
||||
|
43
src/schema/User.ts
Normal file
43
src/schema/User.ts
Normal file
@ -0,0 +1,43 @@
|
||||
export const UserUpdateSchema = {
|
||||
id: String,
|
||||
username: String,
|
||||
discriminator: String,
|
||||
avatar: String || null,
|
||||
$phone: String,
|
||||
desktop: Boolean,
|
||||
mobile: Boolean,
|
||||
premium: Boolean,
|
||||
premium_type: Number,
|
||||
bot: Boolean,
|
||||
system: Boolean,
|
||||
nsfw_allowed: Boolean,
|
||||
mfa_enabled: Boolean,
|
||||
created_at: Date,
|
||||
verified: Boolean,
|
||||
$email: String,
|
||||
flags: BigInt,
|
||||
public_flags: BigInt,
|
||||
$guilds: [String],
|
||||
};
|
||||
|
||||
export interface UserUpdateSchema {
|
||||
id: string;
|
||||
username: string;
|
||||
discriminator: string;
|
||||
avatar: string | null;
|
||||
phone?: string;
|
||||
desktop: boolean;
|
||||
mobile: boolean;
|
||||
premium: boolean;
|
||||
premium_type: number;
|
||||
bot: boolean;
|
||||
system: boolean;
|
||||
nsfw_allowed: boolean;
|
||||
mfa_enabled: boolean;
|
||||
created_at: Date;
|
||||
verified: boolean;
|
||||
email?: string;
|
||||
flags: bigint;
|
||||
public_flags: bigint;
|
||||
guilds: string[];
|
||||
}
|
Loading…
Reference in New Issue
Block a user