1
0
mirror of https://github.com/actix/examples synced 2025-03-15 09:13:06 +01:00

20 lines
576 B
Rust
Raw Normal View History

2019-09-05 00:04:57 +09:00
use actix_web::{web, Error, HttpResponse};
2019-04-09 14:12:07 -04:00
use crate::common::{Part, Product};
2019-12-07 23:59:24 +06:00
pub async fn get_parts(query: web::Query<Option<Part>>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
2019-04-09 14:12:07 -04:00
}
2019-12-07 23:59:24 +06:00
pub async fn add_part(new_part: web::Json<Product>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
2019-04-09 14:12:07 -04:00
}
2019-12-07 23:59:24 +06:00
pub async fn get_part_detail(id: web::Path<String>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
2019-04-09 14:12:07 -04:00
}
2019-12-07 23:59:24 +06:00
pub async fn remove_part(id: web::Path<String>) -> Result<HttpResponse, Error> {
Ok(HttpResponse::Ok().finish())
2019-04-14 10:34:41 -07:00
}