1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Fix some minor typos & bugs; #123

This commit is contained in:
NG (Graham)
2026-07-05 16:28:20 -04:00
committed by NGnius
parent 2adf8249bb
commit 1dc502af32
7 changed files with 8 additions and 10 deletions

View File

@@ -57,7 +57,7 @@ async fn main() -> std::io::Result<()> {
App::new()
.wrap_fn(|req, srv| {
use actix_web::dev::Service;
log::debug!("Request {} {}", req.method(), req.path());
log::trace!("Request {} {}", req.method(), req.path());
srv.call(req)
})
.app_data(cli_args2.clone())
@@ -74,7 +74,7 @@ async fn main() -> std::io::Result<()> {
.service(robocraft::email::email_password_auth)
.service(robocraft::steam::steam_auth)
.service(robocraft::username::user_password_auth)
.service(robocraft::displayname::displaye_password_auth)
.service(robocraft::displayname::display_password_auth)
.service(robocraft::intercom::services_ws)
.service(robocraft::intercom::service_msg)
.service(robocraft::intercom::lobby_state_ws)

View File

@@ -2,7 +2,7 @@ use oj_rc_core::persist::user::FederatedAuthenticator;
use actix_web::{post, web::{Data, Json}};
#[post("/authenticate/displayname/game")]
pub async fn displaye_password_auth(body: Json<libfj::robocraft::EmailUserAuthenticationPayload>, config: Data<super::RcConfig>) -> Result<Json<libfj::robocraft::AuthenticationResponseInfo>, super::ErrorTy> {
pub async fn display_password_auth(body: Json<libfj::robocraft::EmailUserAuthenticationPayload>, config: Data<super::RcConfig>) -> Result<Json<libfj::robocraft::AuthenticationResponseInfo>, super::ErrorTy> {
if body.display_name.is_none() {
return Err(super::ErrorTy::from_err(oj_rc_core::persist::user::AuthError {
message: "Missing display_name".to_owned(),

View File

@@ -4,7 +4,6 @@ use actix_web::{rt, web::{Payload, Data, Path, Json}, Error, HttpRequest, HttpRe
#[get("/intercom/.oj_services/{name}")]
pub async fn services_ws(req: HttpRequest, stream: Payload, auth: Data<super::IntercomAuth>, reg: Data<super::Users>, name: Path<String>) -> Result<HttpResponse, Error> {
log::debug!("intercom/.oj_services name is {}", name);
auth.validate(&req, &format!(".oj_services/{}", urlencoding::encode(&*name)))?;
let (res, mut session, _stream) = actix_ws::handle(&req, stream)?;