init
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
use axum::{Router, routing::get};
|
||||
use axum::{routing::get, Router};
|
||||
|
||||
use super::handlers;
|
||||
|
||||
pub fn router() -> Router {
|
||||
Router::new()
|
||||
.route("/attachments", get(handlers::get_all).post(handlers::create))
|
||||
.route(
|
||||
"/attachments/:id",
|
||||
"/attachments",
|
||||
get(handlers::get_all).post(handlers::create),
|
||||
)
|
||||
.route(
|
||||
"/attachments/{id}",
|
||||
get(handlers::get_by_id)
|
||||
.put(handlers::update)
|
||||
.delete(handlers::delete),
|
||||
|
||||
Reference in New Issue
Block a user