Refactor more stuff

This commit is contained in:
Tobias Reisinger 2023-12-04 23:59:26 +01:00
parent 5a7b2de0ea
commit 9394a1ae52
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
15 changed files with 167 additions and 86 deletions
emgauwa-core/src/handlers/v1/ws

View file

@ -3,7 +3,7 @@ use std::time::Instant;
use actix::Addr;
use actix_web::{get, web, HttpRequest, HttpResponse};
use actix_web_actors::ws;
use emgauwa_lib::errors::{ApiError, EmgauwaError};
use emgauwa_lib::errors::EmgauwaError;
use sqlx::{Pool, Sqlite};
use crate::app_state::AppServer;
@ -28,10 +28,6 @@ pub async fn ws_controllers(
&req,
stream,
)
.map_err(|_| {
EmgauwaError::from(ApiError::InternalError(String::from(
"error starting websocket",
)))
});
.map_err(|_| EmgauwaError::Internal(String::from("error starting websocket")));
resp
}