aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-abuse.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-17 11:28:11 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-17 11:28:11 +0200
commit154898b0b7bc1af41fc5a94974e338a3590c90f3 (patch)
tree5fb90f66da7587aed53c99ac1884c7acd0c1f7ca /server/models/video/video-abuse.ts
parentdf98563e2104b82b119c00a3cd83cd0dc1242d25 (diff)
downloadPeerTube-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.ts5
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
15let VideoAbuse: Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes> 15let VideoAbuse: Sequelize.Model<VideoAbuseInstance, VideoAbuseAttributes>
16let toFormatedJSON: VideoAbuseMethods.ToFormatedJSON
16let listForApi: VideoAbuseMethods.ListForApi 17let listForApi: VideoAbuseMethods.ListForApi
17 18
18export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) { 19export 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
69function toFormatedJSON (this: VideoAbuseInstance) { 70toFormatedJSON = 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
111listForApi = function (start, count, sort, callback) { 112listForApi = 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,