Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
2025-09-26 12:09:36 +09:00
parent 358090db5d
commit e07aad2d7d
7 changed files with 73 additions and 44 deletions

View File

@@ -7,9 +7,9 @@
#include <esp_log.h>
#include <esp_timer.h>
#include <string.h>
#include "auth.h"
#include "esp_http_server.h"
#include "esp_system.h"
#include "auth.h"
static const char* TAG = "odroid";
@@ -52,7 +52,8 @@ void start_reboot_timer(int sec)
static esp_err_t reboot_post_handler(httpd_req_t* req)
{
esp_err_t err = api_auth_check(req);
if (err != ESP_OK) {
if (err != ESP_OK)
{
return err;
}
@@ -87,7 +88,8 @@ void register_reboot_endpoint(httpd_handle_t server)
static esp_err_t version_get_handler(httpd_req_t* req)
{
esp_err_t err = api_auth_check(req);
if (err != ESP_OK) {
if (err != ESP_OK)
{
return err;
}
@@ -103,4 +105,4 @@ void register_version_endpoint(httpd_handle_t server)
httpd_uri_t post_uri = {
.uri = "/api/version", .method = HTTP_GET, .handler = version_get_handler, .user_ctx = NULL};
httpd_register_uri_handler(server, &post_uri);
}
}