mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
This commit is contained in:
parent
45a4f2fbbc
commit
436613ef23
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user