Rename request models

This commit is contained in:
Tobias Reisinger 2024-04-26 02:14:47 +02:00
parent ccc30dcdaf
commit e2f3d7b82a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 19 additions and 19 deletions
emgauwa-core/src/handlers/v1

View file

@ -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?;