mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-11-26 10:40:28 -06:00
Fix client compilation
This commit is contained in:
parent
ee9e7b61f5
commit
46757b477c
@ -1,4 +1,5 @@
|
||||
// Do not use the barrel (dependency loop)
|
||||
import { UserRole } from '../../../../../shared/models/user.model'
|
||||
import { User } from '../../shared/users/user.model';
|
||||
|
||||
export class AuthUser extends User {
|
||||
@ -20,7 +21,7 @@ export class AuthUser extends User {
|
||||
id: parseInt(localStorage.getItem(this.KEYS.ID)),
|
||||
username: localStorage.getItem(this.KEYS.USERNAME),
|
||||
email: localStorage.getItem(this.KEYS.EMAIL),
|
||||
role: localStorage.getItem(this.KEYS.ROLE),
|
||||
role: localStorage.getItem(this.KEYS.ROLE) as UserRole,
|
||||
displayNSFW: localStorage.getItem(this.KEYS.DISPLAY_NSFW) === 'true'
|
||||
},
|
||||
Tokens.load()
|
||||
@ -41,7 +42,7 @@ export class AuthUser extends User {
|
||||
constructor(userHash: {
|
||||
id: number,
|
||||
username: string,
|
||||
role: string,
|
||||
role: UserRole,
|
||||
email: string,
|
||||
displayNSFW: boolean
|
||||
}, hashTokens: any) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { User as UserServerModel } from '../../../../../shared';
|
||||
import { User as UserServerModel, UserRole } from '../../../../../shared';
|
||||
|
||||
export class User implements UserServerModel {
|
||||
id: number;
|
||||
username: string;
|
||||
email: string;
|
||||
role: string;
|
||||
role: UserRole;
|
||||
displayNSFW: boolean;
|
||||
createdAt: Date;
|
||||
|
||||
@ -12,7 +12,7 @@ export class User implements UserServerModel {
|
||||
id: number,
|
||||
username: string,
|
||||
email: string,
|
||||
role: string,
|
||||
role: UserRole,
|
||||
displayNSFW?: boolean,
|
||||
createdAt?: Date,
|
||||
}) {
|
||||
|
Loading…
Reference in New Issue
Block a user