Implemented invitation logic. Implemented play list method. Mild refactoring.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { hashIds } from './guard';
|
||||
|
||||
export interface LoginRequest {
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
export interface ChangePasswordRequest {
|
||||
@@ -9,7 +9,7 @@ export interface ChangePasswordRequest {
|
||||
newPassword: string;
|
||||
}
|
||||
export interface CreateUserRequest {
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
playerId: string;
|
||||
}
|
||||
@@ -17,13 +17,21 @@ export interface UpdateUserRequest {
|
||||
isActive?: boolean;
|
||||
isAdmin?: boolean;
|
||||
}
|
||||
export interface InviteUserRequest {
|
||||
email: string;
|
||||
playerId: string;
|
||||
}
|
||||
export interface AcceptInviteRequest {
|
||||
inviteCode: string;
|
||||
password: string;
|
||||
}
|
||||
export interface CreatePlayerRequest {
|
||||
name: string;
|
||||
}
|
||||
export interface UpdatePlayerRequest {
|
||||
name?: string;
|
||||
isRatingLocked?:boolean;
|
||||
canBeMultiple?:boolean;
|
||||
isRatingLocked?: boolean;
|
||||
canBeMultiple?: boolean;
|
||||
}
|
||||
export interface CreateGameRequest {
|
||||
name: string;
|
||||
@@ -65,6 +73,10 @@ export class SecureId {
|
||||
return this.#hashedValue;
|
||||
}
|
||||
|
||||
valueOf(): string | undefined {
|
||||
return this.#secureValue;
|
||||
}
|
||||
|
||||
public static fromHash(hash: string) {
|
||||
return new SecureId({ public: hash });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user