Mercurial > sci
diff scid/http.c @ 41:00b9af607524
scid: implement /jobresults/id page
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 09 Aug 2022 14:52:34 +0200 |
parents | 96008a1953ba |
children | 576f4b1ec79f |
line wrap: on
line diff
--- a/scid/http.c Sun Aug 07 08:43:32 2022 +0200 +++ b/scid/http.c Tue Aug 09 14:52:34 2022 +0200 @@ -34,14 +34,16 @@ #include "page-api-todo.h" #include "page-api-workers.h" #include "page-index.h" +#include "page-jobresults.h" #include "page-static.h" #include "pageutil.h" enum page { - PAGE_INDEX, /* Job results at index. */ + PAGE_INDEX, /* Job results at index. */ + PAGE_JOBRESULTS, /* List of jobresult for one job. */ PAGE_API, PAGE_STATIC, - PAGE_LAST /* Not used. */ + PAGE_LAST /* Not used. */ }; static void @@ -68,12 +70,14 @@ static const char *pages[] = { [PAGE_INDEX] = "", + [PAGE_JOBRESULTS] = "jobresults", [PAGE_API] = "api", [PAGE_STATIC] = "static" }; static void (*handlers[])(struct kreq *req) = { [PAGE_INDEX] = page_index, + [PAGE_JOBRESULTS] = page_jobresults, [PAGE_API] = dispatch_api, [PAGE_STATIC] = page_static };