Add API
Some checks failed
Build Crate / build (push) Failing after 6m25s

This commit is contained in:
2023-09-20 21:32:19 -04:00
parent ec06340def
commit 3d52cd0a24
8 changed files with 116 additions and 28 deletions

View File

@@ -2,3 +2,20 @@ pub mod index;
pub mod add_game_form;
pub mod one_v_one_board;
pub mod overall_board;
#[cfg(client)]
use perseus::utils::get_path_prefix_client;
pub fn get_api_path(path: &str) -> String {
#[cfg(engine)]
{
path.to_string()
}
#[cfg(client)]
{
let path = web_sys::window().unwrap().location().pathname().unwrap();
// let base_path = get_path_prefix_client();
// format!("{}{}", base_path, path)
path.to_string()
}
}