proper response
This commit is contained in:
+12
-10
@@ -1,19 +1,21 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub enum JobKind {
|
||||
Download,
|
||||
pub struct JobResponse<T> {
|
||||
pub content: Option<T>,
|
||||
pub error: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct InnerStruct {
|
||||
pub str: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct Job {
|
||||
pub struct DownloadJob {
|
||||
pub uuid: Uuid,
|
||||
pub kind: JobKind,
|
||||
pub inner: InnerStruct,
|
||||
pub url: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct DownloadResponse {
|
||||
pub path: PathBuf,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user