refactor: fix types
This commit is contained in:
@@ -217,6 +217,7 @@ export class User {
|
||||
|
||||
export interface ILocalUser extends User {
|
||||
host: null;
|
||||
uri: null;
|
||||
}
|
||||
|
||||
export interface IRemoteUser extends User {
|
||||
@@ -224,12 +225,6 @@ export interface IRemoteUser extends User {
|
||||
uri: string;
|
||||
}
|
||||
|
||||
export type CacheableLocalUser = ILocalUser;
|
||||
|
||||
export type CacheableRemoteUser = IRemoteUser;
|
||||
|
||||
export type CacheableUser = CacheableLocalUser | CacheableRemoteUser;
|
||||
|
||||
export const localUsernameSchema = { type: 'string', pattern: /^\w{1,20}$/.toString().slice(1, -1) } as const;
|
||||
export const passwordSchema = { type: 'string', minLength: 1 } as const;
|
||||
export const nameSchema = { type: 'string', minLength: 1, maxLength: 50 } as const;
|
||||
|
Reference in New Issue
Block a user