|
|
@@ -12,12 +12,15 @@
|
|
|
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
|
*/
|
|
|
let parseParams
|
|
|
+
|
|
|
const tpdsUpdateHandler = require('./TpdsUpdateHandler')
|
|
|
const UpdateMerger = require('./UpdateMerger')
|
|
|
const logger = require('logger-sharelatex')
|
|
|
const Path = require('path')
|
|
|
const metrics = require('metrics-sharelatex')
|
|
|
const NotificationsBuilder = require('../Notifications/NotificationsBuilder')
|
|
|
+const AuthenticationController = require('../Authentication/AuthenticationController')
|
|
|
+const TdpsQueueManager = require('./TpdsQueueManager').promises
|
|
|
|
|
|
module.exports = {
|
|
|
// mergeUpdate and deleteUpdate are used by Dropbox, where the project is only passed as the name, as the
|
|
|
@@ -130,6 +133,16 @@ module.exports = {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ async getQueues(req, res) {
|
|
|
+ const userId = AuthenticationController.getLoggedInUserId(req)
|
|
|
+ try {
|
|
|
+ res.json(await TdpsQueueManager.getQueues(userId))
|
|
|
+ } catch (err) {
|
|
|
+ logger.error({ err, userId }, 'error getting queues')
|
|
|
+ res.json({ error: 'error getting queues' })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
parseParams: (parseParams = function(req) {
|
|
|
let filePath, projectName
|
|
|
let path = req.params[0]
|