diff options
Diffstat (limited to 'server/controllers/api/remote')
-rw-r--r-- | server/controllers/api/remote/videos.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/server/controllers/api/remote/videos.js b/server/controllers/api/remote/videos.js index 6d768eae8..17bdce019 100644 --- a/server/controllers/api/remote/videos.js +++ b/server/controllers/api/remote/videos.js | |||
@@ -171,9 +171,12 @@ function addRemoteVideo (videoToCreateData, fromPod, finalCallback) { | |||
171 | } | 171 | } |
172 | 172 | ||
173 | // Commit transaction | 173 | // Commit transaction |
174 | t.commit() | 174 | t.commit().asCallback(function (err) { |
175 | if (err) return finalCallback(err) | ||
175 | 176 | ||
176 | return finalCallback() | 177 | logger.info('Remote video %s inserted.', videoToCreateData.videoToCreateData.name) |
178 | return finalCallback(null) | ||
179 | }) | ||
177 | }) | 180 | }) |
178 | } | 181 | } |
179 | 182 | ||
@@ -254,10 +257,13 @@ function updateRemoteVideo (videoAttributesToUpdate, fromPod, finalCallback) { | |||
254 | return finalCallback(err) | 257 | return finalCallback(err) |
255 | } | 258 | } |
256 | 259 | ||
257 | // Commit transaction | 260 | // Commit transaction |
258 | t.commit() | 261 | t.commit().asCallback(function (err) { |
262 | if (err) return finalCallback(err) | ||
259 | 263 | ||
260 | return finalCallback() | 264 | logger.info('Remote video %s updated', videoAttributesToUpdate.name) |
265 | return finalCallback(null) | ||
266 | }) | ||
261 | }) | 267 | }) |
262 | } | 268 | } |
263 | 269 | ||