fix: wrong return codes
This commit is contained in:
parent
be3362f7dd
commit
508569c90e
1 changed files with 4 additions and 4 deletions
|
@ -94,18 +94,18 @@ pub async fn has_joined_local(state: &AppState, username: &String, server_id: &S
|
|||
Ok(Json(response))
|
||||
} else {
|
||||
warn!(target: "SESSION", "[HAS_JOINED] server found user but join was late or for another server");
|
||||
Err(StatusCode::NOT_FOUND)
|
||||
Err(StatusCode::UNAUTHORIZED)
|
||||
}
|
||||
},
|
||||
None => {
|
||||
warn!(target: "SESSION", "[HAS_JOINED] server didn't find user");
|
||||
Err(StatusCode::MOVED_PERMANENTLY)
|
||||
Err(StatusCode::UNAUTHORIZED)
|
||||
},
|
||||
}
|
||||
},
|
||||
None => {
|
||||
warn!(target: "SESSION", "[HAS_JOINED] invalid UUID");
|
||||
Err(StatusCode::NOT_FOUND)
|
||||
warn!(target: "SESSION", "[HAS_JOINED] invalid UUID or not in database");
|
||||
Err(StatusCode::MOVED_PERMANENTLY)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue