Refactor more stuff
This commit is contained in:
parent
5a7b2de0ea
commit
9394a1ae52
15 changed files with 167 additions and 86 deletions
emgauwa-core/src/handlers/v1/ws
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue