summaryrefslogtreecommitdiffstats
path: root/src/rest.c
diff options
context:
space:
mode:
authorRoberto Hueso Gómez <rhueso@soleta.eu>2020-08-03 11:45:27 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2020-08-03 13:14:44 +0200
commitb8a509b1dd80cabad5ffeffd0d35117c6d63c7bf (patch)
tree6ba38c9b21f995421a5f9f7192a90debe6c1bf99 /src/rest.c
parent532b0819c48af5fd26592726280374b5abfeacaf (diff)
#980 Change GET and POST /modes URI to /mode
This patch changes the URI since it is semantically more correct to use the singular.
Diffstat (limited to 'src/rest.c')
-rw-r--r--src/rest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rest.c b/src/rest.c
index 56ee7d9..3e4d39c 100644
--- a/src/rest.c
+++ b/src/rest.c
@@ -3482,12 +3482,12 @@ int og_client_state_process_payload_rest(struct og_client *cli)
return og_client_bad_request(cli);
}
err = og_cmd_reboot(root, &params);
- } else if (!strncmp(cmd, "modes", strlen("modes"))) {
+ } else if (!strncmp(cmd, "mode", strlen("mode"))) {
if (method != OG_METHOD_GET && method != OG_METHOD_POST)
return og_client_method_not_found(cli);
if (method == OG_METHOD_POST && !root) {
- syslog(LOG_ERR, "command modes with no payload\n");
+ syslog(LOG_ERR, "command mode with no payload\n");
return og_client_bad_request(cli);
}