refactor: fix types
This commit is contained in:
parent
a71682f6f0
commit
f34f9f6ea5
19 changed files with 95 additions and 102 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue