aboutsummaryrefslogtreecommitdiffhomepage
path: root/routes/api/remoteVideos.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/api/remoteVideos.js')
-rw-r--r--routes/api/remoteVideos.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/routes/api/remoteVideos.js b/routes/api/remoteVideos.js
deleted file mode 100644
index 2ae3ce5bc..000000000
--- a/routes/api/remoteVideos.js
+++ /dev/null
@@ -1,29 +0,0 @@
1;(function () {
2 'use strict'
3
4 var express = require('express')
5 var router = express.Router()
6 var middleware = require('../../middlewares')
7 var videos = require('../../src/videos')
8
9 function addRemoteVideos (req, res, next) {
10 videos.addRemote(req.body.data, function (err, video) {
11 if (err) return next(err)
12
13 res.json(video)
14 })
15 }
16
17 function removeRemoteVideo (req, res, next) {
18 videos.removeRemote(req.body.signature.url, req.body.data.magnetUri, function (err) {
19 if (err) return next(err)
20
21 res.status(204)
22 })
23 }
24
25 router.post('/add', middleware.cache(false), middleware.decryptBody, addRemoteVideos)
26 router.post('/remove', middleware.cache(false), middleware.decryptBody, removeRemoteVideo)
27
28 module.exports = router
29})()