pub async fn get(
__arg0: State<State>,
__arg1: Extension<i64>,
__arg2: Path<String>,
) -> Result<impl IntoResponse>Expand description
Handles asset download requests (GET /api/v1/assets/{hash}).
Verifies that the requesting user owns the asset with the specified hash, and if authorized, streams the physical file back to the client.
§Errors
- Returns a
BadRequestif the hash string cannot be decoded from hex. - Returns a
NotFoundif the user does not own the asset or if the physical file is missing. - Returns an internal error if the database query fails.
§Panics
This function panics if the hardcoded “application/octet-stream” content type cannot be parsed.