diff --git a/services/web/app/coffee/Features/Analytics/AnalyticsController.coffee b/services/web/app/coffee/Features/Analytics/AnalyticsController.coffee index 7773064481..e407feb488 100644 --- a/services/web/app/coffee/Features/Analytics/AnalyticsController.coffee +++ b/services/web/app/coffee/Features/Analytics/AnalyticsController.coffee @@ -25,11 +25,10 @@ module.exports = AnalyticsController = respondWith(error, res, next) licences: (req, res, next) -> - AuthenticationController.getLoggedInUserId(req) or req.sessionID {resource_id, start_date, end_date, lag} = req.query InstitutionsAPI.getInstitutionLicences resource_id, start_date, end_date, lag, (error, licences) -> if error? - res.send 503 + next(error) else res.send licences diff --git a/services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee b/services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee index fb0f890241..57b131326f 100644 --- a/services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee +++ b/services/web/app/coffee/Features/Analytics/AnalyticsRouter.coffee @@ -9,8 +9,6 @@ module.exports = webRouter.put '/editingSession/:projectId', AnalyticsController.updateEditingSession - webRouter.get '/graphs/licences', AnalyticsController.licences - publicApiRouter.use '/analytics/graphs', AuthenticationController.httpAuth, AnalyticsProxy.call('/graphs') diff --git a/services/web/app/coffee/Features/Institutions/InstitutionsAPI.coffee b/services/web/app/coffee/Features/Institutions/InstitutionsAPI.coffee index def1426a28..e2fdab68d7 100644 --- a/services/web/app/coffee/Features/Institutions/InstitutionsAPI.coffee +++ b/services/web/app/coffee/Features/Institutions/InstitutionsAPI.coffee @@ -16,7 +16,7 @@ module.exports = InstitutionsAPI = method: 'GET' path: "/api/v2/institutions/#{institutionId.toString()}/institution_licences" body: {start_date: startDate, end_date: endDate, lag} - defaultErrorMessage: "Couldn't get institution affiliations" + defaultErrorMessage: "Couldn't get institution licences" }, callback getUserAffiliations: (userId, callback = (error, body) ->) ->