Frontend finished

This commit is contained in:
Franklin 2023-04-26 15:09:51 -04:00
parent 1441c51d65
commit 2d44dc3488
7 changed files with 2 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
assets/.DS_Store vendored

Binary file not shown.

BIN
css/.DS_Store vendored

Binary file not shown.

BIN
src/.DS_Store vendored

Binary file not shown.

View File

@ -26,7 +26,7 @@ use crate::utils::admin_panel;
use super::base::{perform_multipart_request_without_client, perform_request_without_client}; use super::base::{perform_multipart_request_without_client, perform_request_without_client};
const BASE_URL: &str = "http://localhost:8095/"; const BASE_URL: &str = "https://proyectosenconstruccion.com/api/";
pub fn get_auth_header() -> (String, String) { pub fn get_auth_header() -> (String, String) {
let token = admin_panel::get_admin_token_from_storage(); let token = admin_panel::get_admin_token_from_storage();

BIN
src/pages/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -11,6 +11,7 @@ macro_rules! authed_call {
match error.clone() { match error.clone() {
err::Error::UnexpectedStatusCode(_, actual, _) => { err::Error::UnexpectedStatusCode(_, actual, _) => {
if actual == 401 { if actual == 401 {
crate::utils::admin_panel::remove_admin_token();
$navigator.push(&crate::routes::main_router::Route::Admin); $navigator.push(&crate::routes::main_router::Route::Admin);
} }
Err(error) Err(error)