Fix debug_mode route

This commit is contained in:
Girish Ramakrishnan
2019-09-19 17:30:24 -07:00
parent bac6d7cf3c
commit c4677505ac

View File

@@ -525,14 +525,13 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout
Client.prototype.debugApp = function (id, state, callback) {
var data = {
appId: id,
debugMode: state ? {
readonlyRootfs: true,
cmd: [ '/bin/bash', '-c', 'echo "Repair mode. Use the webterminal or cloudron exec to repair. Sleeping" && sleep infinity' ]
} : null
};
post('/api/v1/apps/' + id + '/configure', data, null, function (error, data, status) {
post('/api/v1/apps/' + id + '/configure/debug_mode', data, null, function (error, data, status) {
if (error) return callback(error);
if (status !== 202) return callback(new ClientError(status, data));