From 72c7248b6fdcdb2175e726ff51b42e7555f2bd84 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Oct 2017 19:41:09 +0200 Subject: Add video channels --- server/models/user/user-interface.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/models/user/user-interface.ts') diff --git a/server/models/user/user-interface.ts b/server/models/user/user-interface.ts index 8974a9a97..1b5233eaf 100644 --- a/server/models/user/user-interface.ts +++ b/server/models/user/user-interface.ts @@ -5,6 +5,7 @@ import * as Promise from 'bluebird' import { User as FormattedUser } from '../../../shared/models/users/user.model' import { UserRole } from '../../../shared/models/users/user-role.type' import { ResultList } from '../../../shared/models/result-list.model' +import { AuthorInstance } from '../video/author-interface' export namespace UserMethods { export type IsPasswordMatch = (this: UserInstance, password: string) => Promise @@ -17,13 +18,12 @@ export namespace UserMethods { export type GetByUsername = (username: string) => Promise - export type List = () => Promise - export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList > export type LoadById = (id: number) => Promise export type LoadByUsername = (username: string) => Promise + export type LoadByUsernameAndPopulateChannels = (username: string) => Promise export type LoadByUsernameOrEmail = (username: string, email: string) => Promise } @@ -36,10 +36,10 @@ export interface UserClass { countTotal: UserMethods.CountTotal, getByUsername: UserMethods.GetByUsername, - list: UserMethods.List, listForApi: UserMethods.ListForApi, loadById: UserMethods.LoadById, loadByUsername: UserMethods.LoadByUsername, + loadByUsernameAndPopulateChannels: UserMethods.LoadByUsernameAndPopulateChannels, loadByUsernameOrEmail: UserMethods.LoadByUsernameOrEmail } @@ -51,6 +51,8 @@ export interface UserAttributes { displayNSFW?: boolean role: UserRole videoQuota: number + + Author?: AuthorInstance } export interface UserInstance extends UserClass, UserAttributes, Sequelize.Instance { -- cgit v1.2.3