view_calendar.js: finalized a fetch design pattern
[citadel.git] / webcit-ng / server / calendar_functions.c
index 7d88996ed1e16271c6528297b1b8b794fcf948ad..fe179cb008cc86daa3953026a7118fd58a2af9b0 100644 (file)
@@ -45,5 +45,9 @@ void calendar_msglist(struct http_transaction *h, struct ctdlsession *c, char *r
        array_free(msglist);
 
        // FIXME we still fail because we aren't finished yet
-       do_404(h);
+       add_response_header(h, strdup("Content-type"), strdup("application/json"));
+       h->response_code = 200;
+       h->response_string = strdup("OK");
+       h->response_body = "{ \"one\":111 , \"two\":222 , \"three\":333 }";
+       h->response_body_length = strlen(h->response_body);
 }