diff --git a/src/routes/session.rs b/src/routes/session.rs index a86aeac..5f2f6d0 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -42,13 +42,14 @@ pub async fn has_joined_wrapper(State(state): State, Query(query): Que match has_joined_local(&state, username, server_id, user_ip).await { Ok(r) => Ok(r), - Err(e) => { + Err(StatusCode::MOVED_PERMANENTLY) => { if state.fallback { Ok(has_joined_microsoft(&state, username, server_id, user_ip).await?) } else { - Err(e) + Err(StatusCode::UNAUTHORIZED) } - } + }, + Err(e) => Err(e), } } @@ -98,7 +99,7 @@ pub async fn has_joined_local(state: &AppState, username: &String, server_id: &S }, None => { warn!(target: "SESSION", "[HAS_JOINED] server didn't find user"); - Err(StatusCode::NOT_FOUND) + Err(StatusCode::MOVED_PERMANENTLY) }, } },