blob: 5e8c0007ca676f6c4146d5b33aa2c8418fcc11c7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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!();
}
|