domains: remove locked field

we will do this as part of access control if needed later
This commit is contained in:
Girish Ramakrishnan
2020-02-13 21:12:49 -08:00
parent d1911be28c
commit 25d871860d
7 changed files with 24 additions and 69 deletions
+1 -15
View File
@@ -8,8 +8,6 @@ exports = module.exports = {
del: del,
checkDnsRecords: checkDnsRecords,
verifyDomainLock: verifyDomainLock
};
var assert = require('assert'),
@@ -19,18 +17,6 @@ var assert = require('assert'),
HttpError = require('connect-lastmile').HttpError,
HttpSuccess = require('connect-lastmile').HttpSuccess;
function verifyDomainLock(req, res, next) {
assert.strictEqual(typeof req.params.domain, 'string');
domains.get(req.params.domain, function (error, domain) {
if (error) return next(BoxError.toHttpError(error));
if (domain.locked) return next(new HttpError(423, 'This domain is locked'));
next();
});
}
function add(req, res, next) {
assert.strictEqual(typeof req.body, 'object');
@@ -159,4 +145,4 @@ function checkDnsRecords(req, res, next) {
next(new HttpSuccess(200, { needsOverwrite: result.needsOverwrite }));
});
}
}