mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Unify result status strings
This commit is contained in:
parent
899076c77b
commit
fd761397ac
@ -574,7 +574,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)
|
||||||
@ -638,11 +638,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