From 4b9d9ff8e916c61906b586c3b1cf90a3cdfbcc3a Mon Sep 17 00:00:00 2001 From: RobDavenport Date: Sun, 5 May 2024 00:54:14 +0900 Subject: [PATCH] add delete requests --- gamercade_app/src/task_manager/http.rs | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gamercade_app/src/task_manager/http.rs b/gamercade_app/src/task_manager/http.rs index 8b84225..569d4ad 100644 --- a/gamercade_app/src/task_manager/http.rs +++ b/gamercade_app/src/task_manager/http.rs @@ -43,8 +43,10 @@ pub enum DownloadStatus { pub enum HttpRequest { DownloadRom(WithSession), UploadRom(WithSession), - DownloadImage(u64), + DeleteRom(WithSession), + DownloadImage(i64), UploadImage(WithSession), + DeleteImage(WithSession), } #[derive(Debug)] @@ -125,8 +127,22 @@ impl TaskRequest for HttpRequest { .unwrap(), } } - HttpRequest::DownloadImage(request) => todo!(), - HttpRequest::UploadImage(request) => todo!(), + HttpRequest::DeleteRom(request) => { + // TODO: Hit the platform service to delete the rom + todo!() + } + HttpRequest::DownloadImage(request) => { + // TODO: Hit the platform service and download the image file + todo!() + } + HttpRequest::UploadImage(request) => { + // TODO: Upload the image to the service + todo!() + } + HttpRequest::DeleteImage(request) => { + // TODO: Hit the platform service to delete the image + todo!() + } } } }