summaryrefslogtreecommitdiff
path: root/src/handlers/ships.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers/ships.rs')
-rw-r--r--src/handlers/ships.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/handlers/ships.rs b/src/handlers/ships.rs
new file mode 100644
index 0000000..5e8c000
--- /dev/null
+++ b/src/handlers/ships.rs
@@ -0,0 +1,23 @@
+use axum::{Json, extract::Path};
+use solarlib::ship::{Ship, Sha256};
+
+use crate::errors::{JsonResult, StringResult};
+
+
+pub async fn list() -> JsonResult<Json<Vec<Ship>>> {
+ let mut result: Vec<Ship> = Vec::new();
+
+ Ok(Json(result))
+}
+
+pub async fn new(Json(new_ship): Json<Ship>) -> StringResult {
+ unimplemented!();
+}
+
+pub async fn update(Json(new_ship): Json<Ship>) -> StringResult {
+ todo!();
+}
+
+pub async fn delete(Path(shasum): Path<Sha256>) -> StringResult {
+ todo!();
+}