aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael McVady <femtonaut@gmail.com>2024-05-07 16:55:24 -0500
committerMichael McVady <femtonaut@gmail.com>2024-05-07 16:55:24 -0500
commit444104e22a47ca820fc4f35786e169d6cf2f2811 (patch)
tree09cdd224010f1aa9ec73e4572f150e9ab32cd3e1
parenta95eae4452a98ec551c9820598d1e8fae9407714 (diff)
Fix new editHEADmaster
-rw-r--r--assets/entry_new.html8
-rw-r--r--conf/clog.conf2
-rw-r--r--src/clog.c5
3 files changed, 10 insertions, 5 deletions
diff --git a/assets/entry_new.html b/assets/entry_new.html
new file mode 100644
index 0000000..958dedc
--- /dev/null
+++ b/assets/entry_new.html
@@ -0,0 +1,8 @@
+<form action="/entries" method="post">
+<input type="text" id="title" name="title" placeholder="title" style="width: 100%;"/>
+<textarea id="body" name="body" rows="50" style="width: 100%;"></textarea>
+<br>
+<input type="button" value="Preview (N/A)">
+<input type="submit" value="Save">
+</form>
+
diff --git a/conf/clog.conf b/conf/clog.conf
index 8d8e778..9237b53 100644
--- a/conf/clog.conf
+++ b/conf/clog.conf
@@ -45,7 +45,7 @@ domain * {
methods get
}
- route /entries/ {
+ route /entries {
handler save_new_entry
methods post
diff --git a/src/clog.c b/src/clog.c
index f82c875..b98e6d7 100644
--- a/src/clog.c
+++ b/src/clog.c
@@ -487,10 +487,7 @@ int get_new_entry_form(struct http_request *req) {
content = kore_buf_alloc(0);
- kore_buf_appendf(
- content, (const char *) asset_entry_edit_html,
- "", "", ""
- );
+ kore_buf_append(content, asset_entry_new_html, asset_len_entry_new_html);
http_ok_resp(req, HTTP_STATUS_OK, content);