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)
|
// Do not use the barrel (dependency loop)
|
||||||
|
import { UserRole } from '../../../../../shared/models/user.model'
|
||||||
import { User } from '../../shared/users/user.model';
|
import { User } from '../../shared/users/user.model';
|
||||||
|
|
||||||
export class AuthUser extends User {
|
export class AuthUser extends User {
|
||||||
@ -20,7 +21,7 @@ export class AuthUser extends User {
|
|||||||
id: parseInt(localStorage.getItem(this.KEYS.ID)),
|
id: parseInt(localStorage.getItem(this.KEYS.ID)),
|
||||||
username: localStorage.getItem(this.KEYS.USERNAME),
|
username: localStorage.getItem(this.KEYS.USERNAME),
|
||||||
email: localStorage.getItem(this.KEYS.EMAIL),
|
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'
|
displayNSFW: localStorage.getItem(this.KEYS.DISPLAY_NSFW) === 'true'
|
||||||
},
|
},
|
||||||
Tokens.load()
|
Tokens.load()
|
||||||
@ -41,7 +42,7 @@ export class AuthUser extends User {
|
|||||||
constructor(userHash: {
|
constructor(userHash: {
|
||||||
id: number,
|
id: number,
|
||||||
username: string,
|
username: string,
|
||||||
role: string,
|
role: UserRole,
|
||||||
email: string,
|
email: string,
|
||||||
displayNSFW: boolean
|
displayNSFW: boolean
|
||||||
}, hashTokens: any) {
|
}, hashTokens: any) {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { User as UserServerModel } from '../../../../../shared';
|
import { User as UserServerModel, UserRole } from '../../../../../shared';
|
||||||
|
|
||||||
export class User implements UserServerModel {
|
export class User implements UserServerModel {
|
||||||
id: number;
|
id: number;
|
||||||
username: string;
|
username: string;
|
||||||
email: string;
|
email: string;
|
||||||
role: string;
|
role: UserRole;
|
||||||
displayNSFW: boolean;
|
displayNSFW: boolean;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ export class User implements UserServerModel {
|
|||||||
id: number,
|
id: number,
|
||||||
username: string,
|
username: string,
|
||||||
email: string,
|
email: string,
|
||||||
role: string,
|
role: UserRole,
|
||||||
displayNSFW?: boolean,
|
displayNSFW?: boolean,
|
||||||
createdAt?: Date,
|
createdAt?: Date,
|
||||||
}) {
|
}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user