mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-14 00:31:33 +10:00
cleanup and game UI beginnings
This commit is contained in:
@ -18,7 +18,7 @@ use tauri::{http::response, App, AppHandle, Emitter, EventLoopMessage, Manager,
|
||||
use url::Url;
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{db::DatabaseAuth, AppState, AppStatus, User, DB};
|
||||
use crate::{db::{fetch_base_url, DatabaseAuth}, AppState, AppStatus, User, DB};
|
||||
|
||||
#[derive(Serialize)]
|
||||
struct InitiateRequestBody {
|
||||
@ -82,10 +82,7 @@ pub fn generate_authorization_header() -> String {
|
||||
}
|
||||
|
||||
pub fn fetch_user() -> Result<User, ()> {
|
||||
let base_url = {
|
||||
let handle = DB.borrow_data().unwrap();
|
||||
Url::parse(&handle.base_url).unwrap()
|
||||
};
|
||||
let base_url = fetch_base_url();
|
||||
|
||||
let endpoint = base_url.join("/api/v1/client/user").unwrap();
|
||||
let header = generate_authorization_header();
|
||||
|
||||
Reference in New Issue
Block a user