mirror of
https://github.com/OpenNebula/one.git
synced 2026-12-05 06:33:48 +09:00
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
This commit is contained in:
1 parent
45a4f2fbbc
commit
436613ef23
1 file changed
+6
-4
@@ -155,10 +155,12 @@ const deleteProvider = (res = {}, next = () => undefined, params = {}, userData
|
||||
const executedCommand = executeCommand(defaultCommandProvider, paramsCommand)
|
||||
const data = executedCommand.data || ''
|
||||
try {
|
||||
if (executedCommand) {
|
||||
res.locals.httpCode = httpResponse(ok)
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(internalServerError, data)
|
||||
if (executedCommand && executedCommand.success) {
|
||||
if(executedCommand.data.length === 0){
|
||||
res.locals.httpCode = httpResponse(ok)
|
||||
} else {
|
||||
res.locals.httpCode = httpResponse(internalServerError, '', executedCommand.data)
|
||||
}
|
||||
}
|
||||
next()
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user