- removed: api-service

- removed: session-service
- updated: moved health check out of consul registration
- updated: get service info to pull the service from the default namespace for the service account
- updated: the rest of the services to be able to handle the new database tables
This commit is contained in:
2025-03-20 22:53:49 -04:00
parent b9ebdd7080
commit 4046f56191
60 changed files with 233 additions and 30588 deletions

View File

@@ -71,7 +71,7 @@ pub(crate) async fn handle_char_list_req(
let request = CliCharListReq::decode(packet.payload.as_slice());
debug!("{:?}", request);
let mut user_id = 0;
let mut user_id= "".to_string();
let session_id;
if let Some(mut state) = connection_service.get_connection(&connection_id) {
user_id = state.user_id.expect("Missing user id in connection state");
@@ -83,7 +83,7 @@ pub(crate) async fn handle_char_list_req(
// query the character service for the character list for this user
let mut character_client = character_client.lock().await;
let character_list = character_client
.get_character_list(&user_id.to_string())
.get_character_list(&user_id)
.await?;
let mut characters = vec![];
let mut character_id_list: Vec<u32> = Vec::new();
@@ -141,7 +141,7 @@ pub(crate) async fn handle_create_char_req(
let request = CliCreateCharReq::decode(packet.payload.as_slice())?;
debug!("{:?}", request);
let mut user_id = 0;
let mut user_id = "".to_string();
let session_id;
if let Some(mut state) = connection_service.get_connection(&connection_id) {
user_id = state.user_id.expect("Missing user id in connection state");
@@ -194,7 +194,7 @@ pub(crate) async fn handle_delete_char_req(
let request = CliDeleteCharReq::decode(packet.payload.as_slice())?;
debug!("{:?}", request);
let mut user_id = 0;
let mut user_id = "".to_string();
let session_id;
let mut character_id_list: Vec<u32> = Vec::new();
@@ -243,10 +243,10 @@ pub(crate) async fn handle_select_char_req(
let request = CliSelectCharReq::decode(packet.payload.as_slice())?;
debug!("{:?}", request);
let mut user_id = 0;
let mut user_id = "".to_string();
let mut character_id_list: Vec<u32> = Vec::new();
if let Some(mut state) = connection_service.get_connection_mut(&connection_id) {
user_id = state.user_id.expect("Missing user id in connection state");
user_id = state.user_id.clone().expect("Missing user id in connection state");
character_id_list = state
.character_list
.clone()
@@ -368,7 +368,7 @@ pub(crate) async fn handle_select_char_req(
pat_cooldown_time: stats.pat_cooldown_time as u32,
skills: skill_list,
hotbar: hotbar_list,
tag: user_id as u32,
tag: 100,
name,
};
debug!("{:?}", data);