aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 76196a8..736bbfc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -6,7 +6,7 @@ use axum::{
extract::Extension,
http::header::{self, HeaderValue, CONTENT_TYPE},
response::{Html, Response},
- routing::{get, get_service},
+ routing::{delete, get, get_service, post},
Router,
};
use color_eyre::eyre::Result;
@@ -199,6 +199,9 @@ async fn main() -> Result<()> {
.route("/talks/", get(handlers::talks::index))
.route("/talks/:name", get(handlers::talks::post_view))
// notes
+ .route("/api/notes/create", post(handlers::notes::create))
+ .route("/api/notes/:id", delete(handlers::notes::delete))
+ .route("/api/notes/:id/update", post(handlers::notes::update))
.route("/notes", get(handlers::notes::index))
.route("/notes.json", get(handlers::notes::feed))
.route("/notes/:id", get(handlers::notes::view))