X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Fvideo%2Fvideo-abuse-interface.ts;h=16806cae2ee36378486f7bb99ad226c4a24e2bac;hb=608624252466acf9f1d9ee1c1170bd4fe4d18d18;hp=c85d09091ea732a0e460ecabc191655056ed7d14;hpb=154898b0b7bc1af41fc5a94974e338a3590c90f3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/video/video-abuse-interface.ts b/server/models/video/video-abuse-interface.ts index c85d09091..16806cae2 100644 --- a/server/models/video/video-abuse-interface.ts +++ b/server/models/video/video-abuse-interface.ts @@ -1,15 +1,16 @@ import * as Sequelize from 'sequelize' +import * as Promise from 'bluebird' -import { PodInstance } from '../pod' +import { ServerInstance } from '../server/server-interface' +import { ResultList } from '../../../shared' // Don't use barrel, import just what we need -import { VideoAbuse as FormatedVideoAbuse } from '../../../shared/models/video-abuse.model' +import { VideoAbuse as FormattedVideoAbuse } from '../../../shared/models/videos/video-abuse.model' export namespace VideoAbuseMethods { - export type ToFormatedJSON = (this: VideoAbuseInstance) => FormatedVideoAbuse + export type ToFormattedJSON = (this: VideoAbuseInstance) => FormattedVideoAbuse - export type ListForApiCallback = (err: Error, videoAbuseInstances?: VideoAbuseInstance[], total?: number) => void - export type ListForApi = (start: number, count: number, sort: string, callback: ListForApiCallback) => void + export type ListForApi = (start: number, count: number, sort: string) => Promise< ResultList > } export interface VideoAbuseClass { @@ -19,7 +20,7 @@ export interface VideoAbuseClass { export interface VideoAbuseAttributes { reporterUsername: string reason: string - videoId: string + videoId: number } export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttributes, Sequelize.Instance { @@ -27,9 +28,9 @@ export interface VideoAbuseInstance extends VideoAbuseClass, VideoAbuseAttribute createdAt: Date updatedAt: Date - Pod: PodInstance + Server: ServerInstance - toFormatedJSON: VideoAbuseMethods.ToFormatedJSON + toFormattedJSON: VideoAbuseMethods.ToFormattedJSON } export interface VideoAbuseModel extends VideoAbuseClass, Sequelize.Model {}