fix: wrong return codes

This commit is contained in:
əlemi 2023-11-20 02:33:14 +01:00
parent be3362f7dd
commit 508569c90e
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -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)
},
}
}