mittag.h (550B)
1 /** 2 * Lunch Poll Legacy 3 * Copyright 2024, 2025 Matthias Balk 4 */ 5 6 #ifndef __MITTAG_H__ 7 #define __MITTAG_H__ 8 9 #include "http.h" 10 11 static void get_votes(void); 12 static void post_votes(void); 13 static void open_database(void); 14 static void close_database(void); 15 16 static Route routes[] = { 17 { "^/votes/?$", "GET", get_votes }, 18 { "^/votes/?$", "POST", post_votes }, 19 }; 20 21 /* maximum length of fields excluding the terminating null byte ('\0') */ 22 #define MAX_LEN_DATE 10 23 #define MAX_LEN_NAME 64 24 #define MAX_LEN_RESTAURANT_ID 5 25 26 #endif /* __MITTAG_H__ */