Rename request models
This commit is contained in:
parent
ccc30dcdaf
commit
e2f3d7b82a
5 changed files with 19 additions and 19 deletions
emgauwa-core/src/handlers/v1
|
@ -3,7 +3,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, ControllerWsAction, RequestUpdateController};
|
||||
use emgauwa_lib::types::{ControllerUid, ControllerWsAction, RequestControllerUpdate};
|
||||
use sqlx::{Pool, Sqlite};
|
||||
|
||||
use crate::app_state;
|
||||
|
@ -40,10 +40,10 @@ pub async fn show(
|
|||
|
||||
#[put("/controllers/{controller_id}")]
|
||||
pub async fn update(
|
||||
pool: web::Data<Pool<Sqlite>>,
|
||||
app_state: web::Data<Addr<AppState>>,
|
||||
path: web::Path<(String,)>,
|
||||
data: web::Json<RequestUpdateController>,
|
||||
pool: web::Data<Pool<Sqlite>>,
|
||||
app_state: web::Data<Addr<AppState>>,
|
||||
path: web::Path<(String,)>,
|
||||
data: web::Json<RequestControllerUpdate>,
|
||||
) -> Result<HttpResponse, EmgauwaError> {
|
||||
let mut pool_conn = pool.acquire().await?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue