postgresql: fix clear route to have username and remove extra }
This commit is contained in:
+1
-1
@@ -688,7 +688,7 @@ function clearPostgreSql(app, options, callback) {
|
||||
getAddonDetails('postgresql', 'CLOUDRON_POSTGRESQL_TOKEN', function (error, result) {
|
||||
if (error) return callback(error);
|
||||
|
||||
request.delete(`https://${result.ip}:3000/databases/db${appId}/clear?access_token=${result.token}}`, { rejectUnauthorized: false }, function (error, response, body) {
|
||||
request.post(`https://${result.ip}:3000/databases/db${appId}/clear?access_token=${result.token}&username=user${appId}`, { rejectUnauthorized: false }, function (error, response, body) {
|
||||
if (error) return callback(new Error('Error clearing postgresql: ' + error));
|
||||
if (response.statusCode !== 200) return callback(new Error(`Error clearing postgresql. Status code: ${response.statusCode}`));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user