summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-12-24 11:52:50 +0100
committerVincent Douillet <vincent@vdouillet.fr>2024-12-26 10:49:13 +0100
commit2e04b2c23c66a42372d0ecaea2b0f4b2c7b7c7e5 (patch)
tree9249bb0e9792a11bb27df78a4d93a0b3c0be0b33 /main.c
parent878cd6e8792d5ac03eea59fec9fe8e325440d50c (diff)
delete files
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index 430bc6a..8042a00 100644
--- a/main.c
+++ b/main.c
@@ -36,6 +36,7 @@
#include "browse.h"
#include "cgi.h"
#include "config.h"
+#include "delete.h"
#include "download.h"
#include "http.h"
#include "upload.h"
@@ -44,13 +45,15 @@ enum page {
PAGE_BROWSE,
PAGE_DOWNLOAD,
PAGE_UPLOAD,
+ PAGE_DELETE,
PAGE__MAX
};
static const char *const pages[PAGE__MAX] = {
BROWSE_URL,
DOWNLOAD_URL,
- UPLOAD_URL
+ UPLOAD_URL,
+ DELETE_URL,
};
int
@@ -102,6 +105,9 @@ main(void)
case PAGE_UPLOAD:
ret = upload(&r);
break;
+ case PAGE_DELETE:
+ ret = del(&r);
+ break;
default:
http_exit(&r, KHTTP_404, NULL);
}