Commit df9f4e52 authored by Johannes Zellner's avatar Johannes Zellner

Remove unused release routes

parent a18fccf8
......@@ -25,11 +25,6 @@ module.exports = exports = {
list: projectsList,
get: projectsGet,
update: projectsUpdate
},
releases: {
list: releasesList,
get: releasesGet
}
};
......@@ -184,25 +179,3 @@ function projectsUpdate(req, res, next) {
next(new HttpSuccess(202, {}));
});
}
function releasesList(req, res, next) {
assert.strictEqual(typeof req.user, 'object');
database.releases.list(req.user.id, function (error, result) {
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, { releases: result }));
});
}
function releasesGet(req, res, next) {
assert.strictEqual(typeof req.user, 'object');
assert.strictEqual(typeof req.params.projectId, 'string');
assert.strictEqual(typeof req.params.releaseId, 'string');
database.releases.get(req.params.releaseId, function (error, result) {
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, { release: result }));
});
}
......@@ -25,8 +25,6 @@ function start(callback) {
router.get ('/api/v1/projects', routes.auth, routes.projects.list);
router.get ('/api/v1/projects/:projectId', routes.auth, routes.projects.get);
router.post('/api/v1/projects/:projectId', routes.auth, routes.projects.update);
router.get ('/api/v1/projects/:projectId/releases', routes.auth, routes.releases.list);
router.get ('/api/v1/projects/:projectId/releases/:releaseId', routes.auth, routes.releases.get);
app
.use(connectTimeout(10000, { respond: true }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment