mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-05 04:05:16 +00:00
src/api2/admin/datastore/backup.rs: implement upload chunk
This commit is contained in:
parent
66f849d272
commit
1b61b80482
@ -19,7 +19,7 @@ pub struct OutputFormatter {
|
||||
static JSON_CONTENT_TYPE: &str = "application/json;charset=UTF-8";
|
||||
|
||||
|
||||
fn json_response(result: Value) -> Response<Body> {
|
||||
pub fn json_response(result: Value) -> Response<Body> {
|
||||
|
||||
let json_str = result.to_string();
|
||||
|
||||
@ -50,7 +50,7 @@ fn json_format_result(data: Value, rpcenv: &RpcEnvironment) -> Response<Body> {
|
||||
json_response(result)
|
||||
}
|
||||
|
||||
fn json_format_error(err: Error) -> Response<Body> {
|
||||
pub fn json_format_error(err: Error) -> Response<Body> {
|
||||
|
||||
let mut response = if let Some(apierr) = err.downcast_ref::<HttpError>() {
|
||||
let mut resp = Response::new(Body::from(apierr.message.clone()));
|
||||
|
Loading…
Reference in New Issue
Block a user