Should fix front calling wrong api host
All checks were successful
Push image to registry / build-image (push) Successful in 3m43s
All checks were successful
Push image to registry / build-image (push) Successful in 3m43s
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB |
@ -1,13 +1,12 @@
|
|||||||
import { clsx, type ClassValue } from "clsx"
|
import { clsx, type ClassValue } from "clsx";
|
||||||
import { twMerge } from "tailwind-merge"
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export function cn(...inputs: ClassValue[]) {
|
||||||
return twMerge(clsx(inputs))
|
return twMerge(clsx(inputs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export async function httpApi<T>(route: string): Promise<T> {
|
export async function httpApi<T>(route: string): Promise<T> {
|
||||||
let response = await fetch(import.meta.env.VITE_APP_URL + "/api" + route);
|
let response = await fetch(+"/api" + route);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(`HTTP error! status: ${response.status}`);
|
throw new Error(`HTTP error! status: ${response.status}`);
|
||||||
|
Reference in New Issue
Block a user