Rename AppServer to AppState

This commit is contained in:
Tobias Reisinger 2023-12-05 21:57:00 +01:00
parent 6f8d63e7be
commit 8dc9072fe8
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
6 changed files with 19 additions and 19 deletions
emgauwa-core/src/handlers/v1

View file

@ -8,7 +8,7 @@ use emgauwa_lib::utils;
use sqlx::{Pool, Sqlite};
use crate::app_state;
use crate::app_state::AppServer;
use crate::app_state::AppState;
#[get("/api/v1/relays")]
pub async fn index(pool: web::Data<Pool<Sqlite>>) -> Result<HttpResponse, EmgauwaError> {
@ -84,7 +84,7 @@ pub async fn show_for_controller(
#[put("/api/v1/controllers/{controller_id}/relays/{relay_num}")]
pub async fn update_for_controller(
pool: web::Data<Pool<Sqlite>>,
app_server: web::Data<Addr<AppServer>>,
app_server: web::Data<Addr<AppState>>,
path: web::Path<(String, i64)>,
data: web::Json<RequestUpdateRelay>,
) -> Result<HttpResponse, EmgauwaError> {