Mercurial > sci
comparison scid/http.c @ 20:f98ea578b1ef
misc: revamp database
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 19 Jul 2022 21:52:42 +0200 |
parents | 600204c31bf0 |
children | 2cb228f23f53 |
comparison
equal
deleted
inserted
replaced
19:de4bf839b565 | 20:f98ea578b1ef |
---|---|
26 #include <kcgi.h> | 26 #include <kcgi.h> |
27 | 27 |
28 #include "http.h" | 28 #include "http.h" |
29 #include "log.h" | 29 #include "log.h" |
30 #include "page.h" | 30 #include "page.h" |
31 #include "page-api-jobs.h" | |
32 #include "page-api-projects.h" | 31 #include "page-api-projects.h" |
32 #include "page-api-todo.h" | |
33 #include "page-api-workers.h" | 33 #include "page-api-workers.h" |
34 | 34 |
35 enum page { | 35 enum page { |
36 PAGE_API, | 36 PAGE_API, |
37 PAGE_LAST /* Not used. */ | 37 PAGE_LAST /* Not used. */ |
42 { | 42 { |
43 static const struct { | 43 static const struct { |
44 const char *prefix; | 44 const char *prefix; |
45 void (*handler)(struct kreq *); | 45 void (*handler)(struct kreq *); |
46 } apis[] = { | 46 } apis[] = { |
47 { "v1/jobs", page_api_v1_jobs }, | 47 { "v1/todo", page_api_v1_todo }, |
48 { "v1/projects", page_api_v1_projects }, | 48 { "v1/projects", page_api_v1_projects }, |
49 { "v1/workers", page_api_v1_workers }, | 49 { "v1/workers", page_api_v1_workers }, |
50 { NULL, NULL } | 50 { NULL, NULL } |
51 }; | 51 }; |
52 | 52 |