use the right url
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { type Api } from "../../server/src/api";
|
||||
import { treaty } from "@elysiajs/eden";
|
||||
|
||||
const { api } = treaty<Api>("http://localhost:5001", {
|
||||
fetch: { credentials: "include" },
|
||||
});
|
||||
const { api } = treaty<Api>(
|
||||
import.meta.env.DEV ? "http://localhost:5001" : window.location.origin,
|
||||
{
|
||||
fetch: { credentials: "include" },
|
||||
}
|
||||
);
|
||||
export default api;
|
||||
|
||||
Reference in New Issue
Block a user