diff --git a/src/appstore.js b/src/appstore.js index eed6efe9e..6aa87144b 100644 --- a/src/appstore.js +++ b/src/appstore.js @@ -5,7 +5,7 @@ exports = module.exports = { getApp: getApp, getAppVersion: getAppVersion, - registerCloudron: registerCloudron, + registerWithLoginCredentials: registerWithLoginCredentials, purchaseApp: purchaseApp, unpurchaseApp: unpurchaseApp, @@ -386,7 +386,7 @@ function subscribeCloudron(token, callback) { }); } -function registerCloudron(options, callback) { +function registerWithLoginCredentials(options, callback) { assert.strictEqual(typeof options, 'object'); assert.strictEqual(typeof callback, 'function'); diff --git a/src/routes/appstore.js b/src/routes/appstore.js index f7e85d604..08d7f4d96 100644 --- a/src/routes/appstore.js +++ b/src/routes/appstore.js @@ -63,7 +63,7 @@ function registerCloudron(req, res, next) { if ('totpToken' in req.body && typeof req.body.totpToken !== 'string') return next(new HttpError(400, 'totpToken must be string')); if (typeof req.body.signup !== 'boolean') return next(new HttpError(400, 'signup must be a boolean')); - appstore.registerCloudron(req.body, function (error) { + appstore.registerWithLoginCredentials(req.body, function (error) { if (error && error.reason === AppstoreError.ALREADY_EXISTS) return next(new HttpError(409, error.message)); if (error && error.reason === AppstoreError.ACCESS_DENIED) return next(new HttpError(412, error.message)); if (error && error.reason === AppstoreError.ALREADY_REGISTERED) return next(new HttpError(422, error.message));