Rename AppServer to AppState
This commit is contained in:
parent
6f8d63e7be
commit
8dc9072fe8
6 changed files with 19 additions and 19 deletions
emgauwa-core/src/handlers/v1
|
@ -7,7 +7,7 @@ use emgauwa_lib::types::{ControllerUid, ControllerWsAction, RequestUpdateControl
|
|||
use sqlx::{Pool, Sqlite};
|
||||
|
||||
use crate::app_state;
|
||||
use crate::app_state::AppServer;
|
||||
use crate::app_state::AppState;
|
||||
|
||||
#[get("/api/v1/controllers")]
|
||||
pub async fn index(pool: web::Data<Pool<Sqlite>>) -> Result<HttpResponse, EmgauwaError> {
|
||||
|
@ -41,7 +41,7 @@ pub async fn show(
|
|||
#[put("/api/v1/controllers/{controller_id}")]
|
||||
pub async fn update(
|
||||
pool: web::Data<Pool<Sqlite>>,
|
||||
app_server: web::Data<Addr<AppServer>>,
|
||||
app_server: web::Data<Addr<AppState>>,
|
||||
path: web::Path<(String,)>,
|
||||
data: web::Json<RequestUpdateController>,
|
||||
) -> Result<HttpResponse, EmgauwaError> {
|
||||
|
@ -73,7 +73,7 @@ pub async fn update(
|
|||
#[delete("/api/v1/controllers/{controller_id}")]
|
||||
pub async fn delete(
|
||||
pool: web::Data<Pool<Sqlite>>,
|
||||
app_server: web::Data<Addr<AppServer>>,
|
||||
app_server: web::Data<Addr<AppState>>,
|
||||
path: web::Path<(String,)>,
|
||||
) -> Result<HttpResponse, EmgauwaError> {
|
||||
let mut pool_conn = pool.acquire().await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue