Set options on request types
This commit is contained in:
parent
2a82cf79c4
commit
e2cd84b136
4 changed files with 96 additions and 33 deletions
emgauwa-core/src/handlers/v1
|
@ -2,7 +2,7 @@ use actix_web::{delete, get, put, web, HttpResponse};
|
|||
use emgauwa_lib::db::DbController;
|
||||
use emgauwa_lib::errors::{DatabaseError, EmgauwaError};
|
||||
use emgauwa_lib::models::{convert_db_list, Controller, FromDbModel};
|
||||
use emgauwa_lib::types::{ControllerUid, RequestController};
|
||||
use emgauwa_lib::types::{ControllerUid, RequestUpdateController};
|
||||
use sqlx::{Pool, Sqlite};
|
||||
|
||||
#[get("/api/v1/controllers")]
|
||||
|
@ -38,7 +38,7 @@ pub async fn show(
|
|||
pub async fn update(
|
||||
pool: web::Data<Pool<Sqlite>>,
|
||||
path: web::Path<(String,)>,
|
||||
data: web::Json<RequestController>,
|
||||
data: web::Json<RequestUpdateController>,
|
||||
) -> Result<HttpResponse, EmgauwaError> {
|
||||
let mut pool_conn = pool.acquire().await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue