Remove cloudron side migrate api
This is some old api when we had a migrate view in the webadmin This is entirely handled on the appstore for now.
This commit is contained in:
@@ -10,7 +10,6 @@ exports = module.exports = {
|
||||
getProgress: getProgress,
|
||||
getConfig: getConfig,
|
||||
update: update,
|
||||
migrate: migrate,
|
||||
feedback: feedback
|
||||
};
|
||||
|
||||
@@ -129,20 +128,6 @@ function update(req, res, next) {
|
||||
});
|
||||
}
|
||||
|
||||
function migrate(req, res, next) {
|
||||
if (typeof req.body.size !== 'string') return next(new HttpError(400, 'size must be string'));
|
||||
if (typeof req.body.region !== 'string') return next(new HttpError(400, 'region must be string'));
|
||||
|
||||
debug('Migration requested', req.body.size, req.body.region);
|
||||
|
||||
cloudron.migrate(req.body.size, req.body.region, function (error) {
|
||||
if (error && error.reason === CloudronError.BAD_STATE) return next(new HttpError(409, error.message));
|
||||
if (error) return next(new HttpError(500, error));
|
||||
|
||||
next(new HttpSuccess(202, {}));
|
||||
});
|
||||
}
|
||||
|
||||
function feedback(req, res, next) {
|
||||
assert.strictEqual(typeof req.user, 'object');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user