feat: add sharing endpoints — share, link, revoke, public access

This commit is contained in:
2026-05-31 10:50:28 +02:00
parent 2d9dd2c2d0
commit 3399e25441
11 changed files with 814 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
use crate::{
handlers::{albums, assets, auth, health, storage},
handlers::{albums, assets, auth, health, sharing, storage},
openapi::openapi_router,
state::AppState,
};
@@ -28,6 +28,11 @@ pub fn api_v1_router() -> Router<AppState> {
.route("/assets/{id}", get(assets::get_asset))
.route("/assets/{id}/metadata", put(assets::update_metadata))
.route("/assets/{id}/file", get(assets::serve_file))
// sharing
.route("/sharing", post(sharing::share_resource))
.route("/sharing/links", post(sharing::generate_link))
.route("/sharing/{id}", delete(sharing::revoke))
.route("/sharing/access/{token}", get(sharing::access_by_token))
// storage
.route("/storage/volumes", post(storage::register_volume))
.route(