From cd59f14f9de567f2e84f88b3e70d4652ab1e5ea8 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sat, 21 Feb 2026 18:59:19 +0100 Subject: Let the html layer fiddle with request --- src/html.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/html.c') diff --git a/src/html.c b/src/html.c index ec7064c..228e8ef 100644 --- a/src/html.c +++ b/src/html.c @@ -315,7 +315,7 @@ static const char *status_to_display(const char *status) { return status; } -char *html_render_clients_page(const char *host, const struct ListClientResult *result, size_t *out_len) { +char *html_render_clients_page(const struct Request *request, const struct ListClientResult *result, size_t *out_len) { // Count stale clients int stale_count = 0; for (int i = 0; i < result->clients_len; i++) { @@ -409,7 +409,7 @@ char *html_render_clients_page(const char *host, const struct ListClientResult * return buf; } -char *html_render_client_detail_page(const char *host, const char* proto, const struct GetClientOnlyResult *client_result, const struct GetBackupsResult *backups_result, size_t *out_len) { +char *html_render_client_detail_page(const struct Request *request, const struct GetClientOnlyResult *client_result, const struct GetBackupsResult *backups_result, size_t *out_len) { // Determine status and staleness int is_stale = 0; const char *current_status = "OK"; @@ -475,8 +475,8 @@ char *html_render_client_detail_page(const char *host, const char* proto, const " \n" " \n", client_result->secret, - proto != NULL ? proto : "http", - host != NULL ? host : "localhost", + request->proto != NULL ? request->proto : "http", + request->host != NULL ? request->host : "localhost", client_result->name, client_result->secret ); -- cgit v1.2.3