support aquiring server props and test dropping them
This commit is contained in:
parent
3e1afb82c8
commit
7852790a1e
9 changed files with 858 additions and 150 deletions
|
|
@ -58,13 +58,22 @@ pub fn api_router() -> Router<AppState> {
|
|||
"/realms/{slug}/avatar/slot",
|
||||
axum::routing::put(avatars::assign_slot).delete(avatars::clear_slot),
|
||||
)
|
||||
// Inventory routes (require authentication)
|
||||
.route("/inventory", get(inventory::get_inventory))
|
||||
// User inventory routes
|
||||
.route("/user/{uuid}/inventory", get(inventory::get_user_inventory))
|
||||
.route(
|
||||
"/inventory/{item_id}",
|
||||
"/user/{uuid}/inventory/{item_id}",
|
||||
axum::routing::delete(inventory::drop_item),
|
||||
)
|
||||
// Public inventory routes (public server/realm props)
|
||||
.route("/inventory/server", get(inventory::get_server_props))
|
||||
// Server prop catalog (enriched if authenticated)
|
||||
.route("/server/inventory", get(inventory::get_server_props))
|
||||
.route(
|
||||
"/server/inventory/request",
|
||||
axum::routing::post(inventory::acquire_server_prop),
|
||||
)
|
||||
// Realm prop catalog (enriched if authenticated)
|
||||
.route("/realms/{slug}/inventory", get(inventory::get_realm_props))
|
||||
.route(
|
||||
"/realms/{slug}/inventory/request",
|
||||
axum::routing::post(inventory::acquire_realm_prop),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue