Mercurial > sci
comparison scid/page-api-todo.c @ 29:695637f1d8a7
scid: first index page in javascript
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 04 Aug 2022 14:13:58 +0200 |
parents | dae2de19ca5d |
children | 081e1c258e64 |
comparison
equal
deleted
inserted
replaced
28:4c16bb25e4f1 | 29:695637f1d8a7 |
---|---|
19 #include <assert.h> | 19 #include <assert.h> |
20 #include <stdio.h> | 20 #include <stdio.h> |
21 | 21 |
22 #include "crud.h" | 22 #include "crud.h" |
23 #include "db.h" | 23 #include "db.h" |
24 #include "page.h" | 24 #include "pageutil.h" |
25 #include "util.h" | 25 #include "util.h" |
26 | 26 |
27 /* | 27 /* |
28 * GET /api/v1/todo/<worker-name> | 28 * GET /api/v1/todo/<worker-name> |
29 * ------------------------------ | 29 * ------------------------------ |
44 switch (r->method) { | 44 switch (r->method) { |
45 case KMETHOD_GET: | 45 case KMETHOD_GET: |
46 get(r); | 46 get(r); |
47 break; | 47 break; |
48 default: | 48 default: |
49 page(r, KHTTP_400, KMIME_APP_JSON, NULL, NULL); | 49 pageutil_json(r, KHTTP_400, NULL); |
50 break; | 50 break; |
51 } | 51 } |
52 } | 52 } |