aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 17:04:57 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 17:05:55 +0200
commit075f16caac5236cb04c98ae7b3a989766d764bb3 (patch)
tree9a30024aa771735a28d83d9a166033b82dbcaf60 /server/controllers/api/videos
parent4e979c3e1b81f4762025d9db3052b1f70774b3bb (diff)
downloadPeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.gz
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.tar.zst
PeerTube-075f16caac5236cb04c98ae7b3a989766d764bb3.zip
Remove "function" in favor of () => {}
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/index.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index e70a5319e..815881df3 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -49,11 +49,11 @@ const videosRouter = express.Router()
49 49
50// multer configuration 50// multer configuration
51const storage = multer.diskStorage({ 51const storage = multer.diskStorage({
52 destination: function (req, file, cb) { 52 destination: (req, file, cb) => {
53 cb(null, CONFIG.STORAGE.VIDEOS_DIR) 53 cb(null, CONFIG.STORAGE.VIDEOS_DIR)
54 }, 54 },
55 55
56 filename: function (req, file, cb) { 56 filename: (req, file, cb) => {
57 let extension = '' 57 let extension = ''
58 if (file.mimetype === 'video/webm') extension = 'webm' 58 if (file.mimetype === 'video/webm') extension = 'webm'
59 else if (file.mimetype === 'video/mp4') extension = 'mp4' 59 else if (file.mimetype === 'video/mp4') extension = 'mp4'
@@ -310,7 +310,7 @@ function updateVideo (req: express.Request, res: express.Response) {
310 // Force fields we want to update 310 // Force fields we want to update
311 // If the transaction is retried, sequelize will think the object has not changed 311 // If the transaction is retried, sequelize will think the object has not changed
312 // So it will skip the SQL request, even if the last one was ROLLBACKed! 312 // So it will skip the SQL request, even if the last one was ROLLBACKed!
313 Object.keys(videoFieldsSave).forEach(function (key) { 313 Object.keys(videoFieldsSave).forEach(key => {
314 const value = videoFieldsSave[key] 314 const value = videoFieldsSave[key]
315 videoInstance.set(key, value) 315 videoInstance.set(key, value)
316 }) 316 })