From 82742d5d13dc7b0691a79c79f8e62782fcb16e10 Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Thu, 27 Mar 2025 12:52:11 +0300 Subject: Doing SQL (work in progress) --- endpoints.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 endpoints.c (limited to 'endpoints.c') diff --git a/endpoints.c b/endpoints.c deleted file mode 100644 index 789f48a..0000000 --- a/endpoints.c +++ /dev/null @@ -1,42 +0,0 @@ -#include -#include - -#include "microhttpd.h" - -#define CONTAINER_IMPLEMENTATION -#define JACSON_IMPLEMENTATION -#include - -// not accessible in browser because ALL URLs start with / (or with _ in dylib) -char* duplicate(const char* x) { - size_t len = strlen(x); - char* ret = malloc(len+1); - memcpy(ret, x, len); - ret[len] = '\0'; - return ret; -} - -// index, path: / -char* _(struct MHD_Connection* connection) { - const char* resp = "This is an index page!"; - return duplicate(resp); -} - -// home, path: /home -char* _home(struct MHD_Connection* connection) { - const char* resp = "" - "

This is a HOME page!

" - "
" - "Don't click me! :0" - ""; - return duplicate(resp); -} - -// hentai, path: /hidden/hentai -char* _hidden_hentai(struct MHD_Connection* connection) { - const char* resp = "" - "

what did you expect to see...

" - " " - ""; - return duplicate(resp); -} -- cgit v1.2.3-70-g09d2