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

20 lines
580 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};
2020-04-03 16:14:30 +09:00
pub async fn get_parts(_query: web::Query<Option<Part>>) -> Result<HttpResponse, Error> {
2019-12-07 23:59:24 +06:00
Ok(HttpResponse::Ok().finish())
2019-04-09 14:12:07 -04:00
}
2020-04-03 16:14:30 +09:00
pub async fn add_part(_new_part: web::Json<Product>) -> Result<HttpResponse, Error> {
2019-12-07 23:59:24 +06:00
Ok(HttpResponse::Ok().finish())
2019-04-09 14:12:07 -04:00
}
2020-04-03 16:14:30 +09:00
pub async fn get_part_detail(_id: web::Path<String>) -> Result<HttpResponse, Error> {
2019-12-07 23:59:24 +06:00
Ok(HttpResponse::Ok().finish())
2019-04-09 14:12:07 -04:00
}
2020-04-03 16:14:30 +09:00
pub async fn remove_part(_id: web::Path<String>) -> Result<HttpResponse, Error> {
2019-12-07 23:59:24 +06:00
Ok(HttpResponse::Ok().finish())
2019-04-14 10:34:41 -07:00
}