diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-06-17 11:28:11 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-06-17 11:28:11 +0200 |
commit | 154898b0b7bc1af41fc5a94974e338a3590c90f3 (patch) | |
tree | 5fb90f66da7587aed53c99ac1884c7acd0c1f7ca /server/models/video/video-abuse.ts | |
parent | df98563e2104b82b119c00a3cd83cd0dc1242d25 (diff) | |
download | PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.tar.gz PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.tar.zst PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.zip |
Share models between server and client
Diffstat (limited to 'server/models/video/video-abuse.ts')
-rw-r--r-- | server/models/video/video-abuse.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts index f5b4debe6..bc5f01e21 100644 --- a/server/models/video/video-abuse.ts +++ b/server/models/video/video-abuse.ts | |||
@@ -13,6 +13,7 @@ import { | |||
13 | } from './video-abuse-interface' | 13 | } from './video-abuse-interface' |
14 | 14 | ||
15 | let VideoAbuse: Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> | 15 | let VideoAbuse: Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> |
16 | let toFormatedJSON: VideoAbuseMethods.ToFormatedJSON | ||
16 | let listForApi: VideoAbuseMethods.ListForApi | 17 | let listForApi: VideoAbuseMethods.ListForApi |
17 | 18 | ||
18 | export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) { | 19 | export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) { |
@@ -66,7 +67,7 @@ export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.Da | |||
66 | 67 | ||
67 | // ------------------------------ METHODS ------------------------------ | 68 | // ------------------------------ METHODS ------------------------------ |
68 | 69 | ||
69 | function toFormatedJSON (this: VideoAbuseInstance) { | 70 | toFormatedJSON = function (this: VideoAbuseInstance) { |
70 | let reporterPodHost | 71 | let reporterPodHost |
71 | 72 | ||
72 | if (this.Pod) { | 73 | if (this.Pod) { |
@@ -108,7 +109,7 @@ function associate (models) { | |||
108 | }) | 109 | }) |
109 | } | 110 | } |
110 | 111 | ||
111 | listForApi = function (start, count, sort, callback) { | 112 | listForApi = function (start: number, count: number, sort: string, callback: VideoAbuseMethods.ListForApiCallback) { |
112 | const query = { | 113 | const query = { |
113 | offset: start, | 114 | offset: start, |
114 | limit: count, | 115 | limit: count, |