v3: added user profile description
This commit is contained in:
@@ -44,6 +44,7 @@ export interface User {
|
||||
createdAt: Date;
|
||||
updatedAt?: Date;
|
||||
avatarMime?: string;
|
||||
description?: string;
|
||||
invitedByUsername?: string;
|
||||
}
|
||||
|
||||
@@ -62,6 +63,7 @@ export interface UpdateUserRequest {
|
||||
username?: string;
|
||||
password?: string;
|
||||
isAdmin?: boolean;
|
||||
description?: string | null;
|
||||
}
|
||||
|
||||
export function isLoginUserRequest(obj: unknown): obj is LoginUserRequest {
|
||||
@@ -83,7 +85,9 @@ export function isUpdateUserRequest(obj: unknown): obj is UpdateUserRequest {
|
||||
return !!obj && typeof obj === "object" &&
|
||||
(!("username" in obj) || typeof obj.username === "string") &&
|
||||
(!("password" in obj) || typeof obj.password === "string") &&
|
||||
(!("isAdmin" in obj) || typeof obj.isAdmin === "boolean");
|
||||
(!("isAdmin" in obj) || typeof obj.isAdmin === "boolean") &&
|
||||
(!("description" in obj) || typeof obj.description === "string" ||
|
||||
obj.description === null);
|
||||
}
|
||||
|
||||
export interface AuthResponse {
|
||||
|
||||
Reference in New Issue
Block a user