Remove unused /api/v1/subdomains/:subdomain

This commit is contained in:
Johannes Zellner
2016-05-06 14:51:02 +02:00
parent b88ee8143a
commit c7958f8e1d
3 changed files with 0 additions and 33 deletions
-12
View File
@@ -2,7 +2,6 @@
exports = module.exports = {
getApp: getApp,
getAppBySubdomain: getAppBySubdomain,
getApps: getApps,
getAppIcon: getAppIcon,
installApp: installApp,
@@ -68,17 +67,6 @@ function getApp(req, res, next) {
});
}
function getAppBySubdomain(req, res, next) {
assert.strictEqual(typeof req.params.subdomain, 'string');
apps.getBySubdomain(req.params.subdomain, function (error, app) {
if (error && error.reason === AppsError.NOT_FOUND) return next(new HttpError(404, 'No such subdomain'));
if (error) return next(new HttpError(500, error));
next(new HttpSuccess(200, removeInternalAppFields(app)));
});
}
function getApps(req, res, next) {
assert.strictEqual(typeof req.user, 'object');
-18
View File
@@ -446,24 +446,6 @@ describe('Apps', function () {
});
});
it('can get appBySubdomain', function (done) {
superagent.get(SERVER_URL + '/api/v1/subdomains/' + APP_LOCATION)
.end(function (err, res) {
expect(res.statusCode).to.equal(200);
expect(res.body.id).to.eql(APP_ID);
expect(res.body.installationState).to.be.ok();
done();
});
});
it('cannot get invalid app by Subdomain', function (done) {
superagent.get(SERVER_URL + '/api/v1/subdomains/tikaloma')
.end(function (err, res) {
expect(res.statusCode).to.equal(404);
done();
});
});
it('cannot uninstall invalid app', function (done) {
superagent.post(SERVER_URL + '/api/v1/apps/whatever/uninstall')
.send({ password: PASSWORD })