send job fix

This commit is contained in:
jasinco 2025-12-16 23:27:19 +08:00
parent 9e38b1cc8d
commit 9c5f05027a

View file

@ -1,4 +1,5 @@
#include "meshtalos.h"
#include "freertos/idf_additions.h"
#include "lib/mongoose.h"
#include <string.h>
@ -15,6 +16,8 @@ static void ev_handler(struct mg_connection *c, int ev, void *ev_data) {
if (mg_match(hm->uri, mg_str("/api/tag"), NULL)) { // REST API call?
if (hm->body.len == sizeof(image_buf)) {
memcpy(image_buf, hm->body.buf, sizeof(image_buf));
struct sync_jobs jb;
xQueueSend(sub_jobs, &jb, 0);
mg_http_reply(c, 200, "", "fin");
flag_refresh = true;
return;