aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-08 15:51:46 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commit310b5219b38427f0c2c7ba57225afdd8f3064380 (patch)
tree853ff7e4e66425ca47b0999384eeb08ed14b28ff /server/controllers/api
parent811cef146c841ef8530bc812c05dfee77e0f2998 (diff)
downloadPeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.tar.gz
PeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.tar.zst
PeerTube-310b5219b38427f0c2c7ba57225afdd8f3064380.zip
Add new abuses tests
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/abuse.ts4
-rw-r--r--server/controllers/api/users/my-history.ts2
2 files changed, 2 insertions, 4 deletions
diff --git a/server/controllers/api/abuse.ts b/server/controllers/api/abuse.ts
index 38808021d..04a0c06e3 100644
--- a/server/controllers/api/abuse.ts
+++ b/server/controllers/api/abuse.ts
@@ -100,7 +100,7 @@ async function updateAbuse (req: express.Request, res: express.Response) {
100 return abuse.save({ transaction: t }) 100 return abuse.save({ transaction: t })
101 }) 101 })
102 102
103 // Do not send the delete to other instances, we updated OUR copy of this video abuse 103 // Do not send the delete to other instances, we updated OUR copy of this abuse
104 104
105 return res.type('json').status(204).end() 105 return res.type('json').status(204).end()
106} 106}
@@ -112,7 +112,7 @@ async function deleteAbuse (req: express.Request, res: express.Response) {
112 return abuse.destroy({ transaction: t }) 112 return abuse.destroy({ transaction: t })
113 }) 113 })
114 114
115 // Do not send the delete to other instances, we delete OUR copy of this video abuse 115 // Do not send the delete to other instances, we delete OUR copy of this abuse
116 116
117 return res.type('json').status(204).end() 117 return res.type('json').status(204).end()
118} 118}
diff --git a/server/controllers/api/users/my-history.ts b/server/controllers/api/users/my-history.ts
index 77a15e5fc..dc915977f 100644
--- a/server/controllers/api/users/my-history.ts
+++ b/server/controllers/api/users/my-history.ts
@@ -50,7 +50,5 @@ async function removeUserHistory (req: express.Request, res: express.Response) {
50 return UserVideoHistoryModel.removeUserHistoryBefore(user, beforeDate, t) 50 return UserVideoHistoryModel.removeUserHistoryBefore(user, beforeDate, t)
51 }) 51 })
52 52
53 // Do not send the delete to other instances, we delete OUR copy of this video abuse
54
55 return res.type('json').status(204).end() 53 return res.type('json').status(204).end()
56} 54}