multi-hotel-refactor #3

Merged
Rominou merged 27 commits from multi-hotel-refactor into master 2026-03-11 13:32:43 +00:00
8 changed files with 4 additions and 4 deletions
Showing only changes of commit 5a8d1e447b - Show all commits

BIN
db/1.sqlite-shm Normal file

Binary file not shown.

0
db/1.sqlite-wal Normal file
View File

BIN
db/auth.sqlite-shm Normal file

Binary file not shown.

0
db/auth.sqlite-wal Normal file
View File

BIN
db/auth_copy_2.sqlite-shm Normal file

Binary file not shown.

View File

View File

@@ -241,7 +241,7 @@ pub async fn get_message(
struct User { struct User {
id: i32, id: i32,
username: String, username: String,
display_name: String, //display_name: String,
} }
@@ -255,7 +255,7 @@ pub async fn get_hotel_users(
}; };
let mut stmt = match conn.prepare( let mut stmt = match conn.prepare(
"SELECT id, username, displayname FROM users WHERE hotel_id = ?1", "SELECT user_id, username FROM hotel_user_link WHERE hotel_id = ?1",
) { ) {
Ok(s) => s, Ok(s) => s,
Err(e) => return (StatusCode::INTERNAL_SERVER_ERROR, format!("Prepare failed: {}", e)), Err(e) => return (StatusCode::INTERNAL_SERVER_ERROR, format!("Prepare failed: {}", e)),
@@ -265,7 +265,7 @@ pub async fn get_hotel_users(
Ok(User { Ok(User {
id: row.get(0)?, id: row.get(0)?,
username: row.get(1)?, username: row.get(1)?,
display_name: row.get(2)?, //display_name: row.get(2)?,
}) })
}) { }) {
Ok(iter) => iter, Ok(iter) => iter,

View File

@@ -20,6 +20,6 @@ pub fn chat_routes() -> Router<AppState> {
.route("/send_message", post(send_message)) .route("/send_message", post(send_message))
.route("/get_conv", post(get_convs)) .route("/get_conv", post(get_convs))
.route("/get_message", get(get_message)) .route("/get_message", get(get_message))
.route("/hotel_users", get(get_hotel_users)) .route("/hotel_users", post(get_hotel_users))
} }