Skip to content
Snippets Groups Projects
Commit acb630be authored by Maarten de Waard's avatar Maarten de Waard :angel:
Browse files

Merge branch '17-rename-encryption-add-to-encryption-init' into 'master'

Rename encryption/add to encryption/init

Closes #17

See merge request !7
parents 0151e1cb 05309723
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@
* @param[in] user_data extra data to pass between handler and main thread
* @return internal status code
*/
int callback_encryption_add(const struct _u_request * request,
int callback_encryption_init(const struct _u_request * request,
struct _u_response * response, void * user_data)
{
bool * reboot = (bool *)user_data;
......
......@@ -6,7 +6,7 @@
#include <auxiliary.c>
#include <encryption_functions.c>
#include <api/default.c>
#include <api/encryption_add.c>
#include <api/encryption_init.c>
#include <api/encryption_unlock.c>
#include <api/ssh_keys_get.c>
......@@ -36,8 +36,8 @@ int main(int argc, char ** argv)
// Add api endpoints.
bool reboot = false;
ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, "/encryption/add",
0, &callback_encryption_add, &reboot);
ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, "/encryption/init",
0, &callback_encryption_init, &reboot);
ulfius_add_endpoint_by_val(&instance, "POST", PREFIX, "/encryption/unlock",
0, &callback_encryption_unlock, NULL);
ulfius_add_endpoint_by_val(&instance, "GET" , PREFIX, "/ssh/keys",
......@@ -92,7 +92,7 @@ int main(int argc, char ** argv)
ulfius_stop_framework(&instance);
ulfius_clean_instance(&instance);
// Check if the encryption/add said that we should reboot.
// Check if the encryption/init handler said that we should reboot.
if (reboot)
{
printf("rebooting...");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment