Skip to content

Commit

Permalink
fix user types
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jan 12, 2024
1 parent 2bcdd9e commit 43e5fe5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/v2/interfaces/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export interface UserNames extends Array<UserName> {}

export interface UserProfile {
id?: string;
media: Media[] | undefined;
media?: Medias;
username: string | undefined;
uuid: string | undefined;
}

export interface User extends UserCreationParams {
warns?: Array<string>; // list of all warns
id: string; // discord user id
media: Medias;
media?: Medias;
}

export interface Users extends Array<User> {}
Expand Down
5 changes: 2 additions & 3 deletions src/v2/repository/firestorm/user.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ export default class UserFirestormRepository implements UserRepository {
}

update(id: string, user: UserCreationParams): Promise<User> {
/** @todo fix weird user types here */
return users.set(id, user as any).then(() => this.getUserById(id));
return users.set(id, user).then(() => this.getUserById(id));
}

delete(id: string): Promise<void> {
Expand All @@ -183,7 +182,7 @@ export default class UserFirestormRepository implements UserRepository {
username: string;
uuid: string;
anonymous: boolean;
media: Medias;
media?: Medias;
}>,
) =>
_users.map((el) => ({
Expand Down

0 comments on commit 43e5fe5

Please sign in to comment.