registry config: add provider
This commit is contained in:
@@ -194,6 +194,7 @@ function getRegistryConfig(req, res, next) {
|
||||
function setRegistryConfig(req, res, next) {
|
||||
assert.strictEqual(typeof req.body, 'object');
|
||||
|
||||
if (typeof req.body.provider !== 'string') return next(new HttpError(400, 'provider is required'));
|
||||
if (typeof req.body.serverAddress !== 'string') return next(new HttpError(400, 'serverAddress is required'));
|
||||
if ('username' in req.body && typeof req.body.username !== 'string') return next(new HttpError(400, 'username is required'));
|
||||
if ('email' in req.body && typeof req.body.email !== 'string') return next(new HttpError(400, 'email is required'));
|
||||
|
||||
Reference in New Issue
Block a user