mirror of
https://github.com/simon987/sist2.git
synced 2025-04-21 11:16:46 +00:00
Compare commits
No commits in common. "5a1a04629f6b237b3d78b18f3060aef938449ab9" and "f984baf7fde4dd8c91b59f76d56c70e74f37e542" have entirely different histories.
5a1a04629f
...
f984baf7fd
@ -531,8 +531,8 @@ class Sist2Api {
|
||||
size: 0
|
||||
}).then(res => {
|
||||
const range = {
|
||||
min: res.aggregations.dateMin.value / 1000,
|
||||
max: res.aggregations.dateMax.value / 1000,
|
||||
min: res.aggregations.dateMin.value,
|
||||
max: res.aggregations.dateMax.value,
|
||||
}
|
||||
|
||||
if (range.min == null) {
|
||||
|
@ -248,11 +248,9 @@ void serve_file_from_disk(cJSON *json, index_t *idx, struct mg_connection *nc, s
|
||||
|
||||
char mime_mapping[8192];
|
||||
if (strlen(ext) == 0) {
|
||||
snprintf(mime_mapping, sizeof(mime_mapping), "%s=%s%s",
|
||||
full_path, mime, STR_STARTS_WITH_CONSTANT(mime, "text/") ? "; charset=utf8" : "");
|
||||
snprintf(mime_mapping, sizeof(mime_mapping), "%s=%s", full_path, mime);
|
||||
} else {
|
||||
snprintf(mime_mapping, sizeof(mime_mapping), "%s=%s%s",
|
||||
ext, mime, STR_STARTS_WITH_CONSTANT(mime, "text/") ? "; charset=utf8" : "");
|
||||
snprintf(mime_mapping, sizeof(mime_mapping), "%s=%s", ext, mime);
|
||||
}
|
||||
|
||||
struct mg_http_serve_opts opts = {
|
||||
@ -528,9 +526,9 @@ void tag(struct mg_connection *nc, struct mg_http_message *hm) {
|
||||
}
|
||||
|
||||
tag_req_t *req = parse_tag_request(json);
|
||||
cJSON_Delete(json);
|
||||
if (req == NULL) {
|
||||
LOG_DEBUGF("serve.c", "Could not parse tag request", arg_index);
|
||||
cJSON_Delete(json);
|
||||
HTTP_REPLY_BAD_REQUEST
|
||||
return;
|
||||
}
|
||||
@ -554,7 +552,6 @@ void tag(struct mg_connection *nc, struct mg_http_message *hm) {
|
||||
}
|
||||
|
||||
free(req);
|
||||
cJSON_Delete(json);
|
||||
}
|
||||
|
||||
int validate_auth(struct mg_connection *nc, struct mg_http_message *hm) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user