remove reserved 'api' location

this is unused and we have no plans to use it.
This commit is contained in:
Girish Ramakrishnan
2019-06-09 18:16:14 -07:00
parent b26167481e
commit 88fa4cf188
3 changed files with 3 additions and 5 deletions
-1
View File
@@ -1,7 +1,6 @@
'use strict';
exports = module.exports = {
API_LOCATION: 'api', // this is unused but reserved for future use (#403)
SMTP_LOCATION: 'smtp',
IMAP_LOCATION: 'imap',
-1
View File
@@ -145,7 +145,6 @@ function validateHostname(location, domainObject) {
const hostname = fqdn(location, domainObject);
const RESERVED_LOCATIONS = [
constants.API_LOCATION,
constants.SMTP_LOCATION,
constants.IMAP_LOCATION
];
+3 -3
View File
@@ -381,13 +381,13 @@ describe('App API', function () {
});
});
it('app install fails - reserved api location', function (done) {
it('app install fails - reserved smtp location', function (done) {
superagent.post(SERVER_URL + '/api/v1/apps/install')
.query({ access_token: token })
.send({ manifest: APP_MANIFEST, location: constants.API_LOCATION, accessRestriction: null, domain: DOMAIN_0.domain })
.send({ manifest: APP_MANIFEST, location: constants.SMTP_LOCATION, accessRestriction: null, domain: DOMAIN_0.domain })
.end(function (err, res) {
expect(res.statusCode).to.equal(400);
expect(res.body.message).to.contain(constants.API_LOCATION + ' is reserved');
expect(res.body.message).to.contain(constants.SMTP_LOCATION + ' is reserved');
done();
});
});