Skip to content

Commit

Permalink
[development] Rework HTTP API
Browse files Browse the repository at this point in the history
  • Loading branch information
ppodolsky committed Mar 4, 2024
1 parent a2067e0 commit 2892f14
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 217 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use axum::body::Body;
use axum::extract::{Query, Request};
use axum::http::StatusCode;
use axum::response::{IntoResponse, Response};
use axum::routing::{delete, post, put};
use axum::routing::{delete, head, post, put};
use axum::{
extract::{Path, State},
routing::get,
Expand Down Expand Up @@ -159,10 +159,10 @@ async fn app() -> Result<(), Error> {
.route("/tables/:table/import/", post(tables_import))
.route("/tables/:table/", get(table_ls))
.route("/tables/:table/share/", get(table_share))
.route("/tables/:table/:key/", get(table_get))
.route("/tables/:table/:key/exists/", get(table_exists))
.route("/tables/:table/:key/", put(table_insert))
.route("/tables/:table/:key/", delete(table_delete))
.route("/tables/:table/*key", get(table_get))
.route("/tables/:table/*key", head(table_exists))
.route("/tables/:table/*key", put(table_insert))
.route("/tables/:table/*key", delete(table_delete))
.route("/tables/foreign_insert/", post(table_foreign_insert))
.layer(
TraceLayer::new_for_http()
Expand Down
Loading

0 comments on commit 2892f14

Please sign in to comment.