proper response

This commit is contained in:
2026-03-02 23:34:51 +01:00
parent a2a677eaaa
commit feff3dd20e
5 changed files with 86 additions and 51 deletions
+12 -10
View File
@@ -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,
}