mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Create types for model enums
This commit is contained in:
parent
70c065d64c
commit
ee9e7b61f5
21 changed files with 89 additions and 29 deletions
|
@ -2,7 +2,7 @@ import * as Sequelize from 'sequelize'
|
|||
import * as Bluebird from 'bluebird'
|
||||
|
||||
// Don't use barrel, import just what we need
|
||||
import { User as FormatedUser } from '../../../shared/models/user.model'
|
||||
import { UserRole, User as FormatedUser } from '../../../shared/models/user.model'
|
||||
|
||||
export namespace UserMethods {
|
||||
export type IsPasswordMatchCallback = (err: Error, same: boolean) => void
|
||||
|
@ -51,7 +51,7 @@ export interface UserAttributes {
|
|||
username: string
|
||||
email: string
|
||||
displayNSFW?: boolean
|
||||
role: string
|
||||
role: UserRole
|
||||
}
|
||||
|
||||
export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance<UserAttributes> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue