mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-22 17:28:02 +02:00
Unify result status strings
This commit is contained in:
parent
a8256ab422
commit
fd071f9512
@ -544,7 +544,7 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
|
|||||||
if (params->Get("macros").IsObjectType<Dictionary>())
|
if (params->Get("macros").IsObjectType<Dictionary>())
|
||||||
resolvers.emplace_back("override",HttpUtility::GetLastParameter(params, "macros"));
|
resolvers.emplace_back("override",HttpUtility::GetLastParameter(params, "macros"));
|
||||||
else
|
else
|
||||||
return ApiActions::CreateResult(400, "macros must be a dictionary");
|
return ApiActions::CreateResult(400, "Parameter macros must be a dictionary.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (service)
|
if (service)
|
||||||
@ -608,11 +608,11 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
|
|||||||
|
|
||||||
/* Get TTL param */
|
/* Get TTL param */
|
||||||
if (!params->Contains("ttl"))
|
if (!params->Contains("ttl"))
|
||||||
return ApiActions::CreateResult(400, "ttl is required");
|
return ApiActions::CreateResult(400, "Parameter ttl is required.");
|
||||||
|
|
||||||
double ttl = HttpUtility::GetLastParameter(params, "ttl");
|
double ttl = HttpUtility::GetLastParameter(params, "ttl");
|
||||||
if (ttl <= 0)
|
if (ttl <= 0)
|
||||||
return ApiActions::CreateResult(400, "ttl must be greater than 0");
|
return ApiActions::CreateResult(400, "Parameter ttl must be greater than 0.");
|
||||||
|
|
||||||
/* This generates a UUID */
|
/* This generates a UUID */
|
||||||
String uuid = Utility::NewUniqueID();
|
String uuid = Utility::NewUniqueID();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user