MXS-1220: Fix minor bugs
Destroyed servers were still shown as a part of the servers resource collection. If a parameter defined in persisted configurations was replaced, the value would be appended to itself after it was replaced. Return correct error codes for internal errors. The server check was checking for old parameter locations.
This commit is contained in:
@ -206,7 +206,7 @@ HttpResponse cb_get_server(const HttpRequest& request)
|
||||
return HttpResponse(MHD_HTTP_OK, server_to_json(server, request.host()));
|
||||
}
|
||||
|
||||
return HttpResponse(MHD_HTTP_NOT_FOUND);
|
||||
return HttpResponse(MHD_HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
HttpResponse cb_all_services(const HttpRequest& request)
|
||||
@ -223,7 +223,7 @@ HttpResponse cb_get_service(const HttpRequest& request)
|
||||
return HttpResponse(MHD_HTTP_OK, service_to_json(service, request.host()));
|
||||
}
|
||||
|
||||
return HttpResponse(MHD_HTTP_NOT_FOUND);
|
||||
return HttpResponse(MHD_HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
HttpResponse cb_all_filters(const HttpRequest& request)
|
||||
@ -240,7 +240,7 @@ HttpResponse cb_get_filter(const HttpRequest& request)
|
||||
return HttpResponse(MHD_HTTP_OK, filter_to_json(filter, request.host()));
|
||||
}
|
||||
|
||||
return HttpResponse(MHD_HTTP_NOT_FOUND);
|
||||
return HttpResponse(MHD_HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
HttpResponse cb_all_monitors(const HttpRequest& request)
|
||||
@ -257,7 +257,7 @@ HttpResponse cb_get_monitor(const HttpRequest& request)
|
||||
return HttpResponse(MHD_HTTP_OK, monitor_to_json(monitor, request.host()));
|
||||
}
|
||||
|
||||
return HttpResponse(MHD_HTTP_NOT_FOUND);
|
||||
return HttpResponse(MHD_HTTP_INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
HttpResponse cb_all_sessions(const HttpRequest& request)
|
||||
|
||||
Reference in New Issue
Block a user