Skip to main content

delete

Function delete 

Source
pub async fn delete(
    __arg0: State<State>,
    __arg1: Extension<i64>,
    __arg2: Path<String>,
) -> Result<impl IntoResponse>
Expand description

Handles asset deletion requests (DELETE /api/v1/assets/{hash}).

This endpoint removes the user’s ownership of the specified asset hash. If the asset is no longer owned by any user, the underlying physical file is deleted from the storage vault.

§Errors

  • Returns a BadRequest if the hash string cannot be decoded from hex.
  • Returns an internal error if the database transaction or file deletion fails.