Updated client env references
This commit is contained in:
@@ -17,7 +17,7 @@ import AlertDescription from './components/ui/alert/AlertDescription.vue';
|
|||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
|
||||||
// onMounted(async () => {
|
// onMounted(async () => {
|
||||||
// const res = await fetch(`${import.meta.env.VITE_APIHOST}/members/me`, {
|
// const res = await fetch(`${import.meta.env.BASE_URL}/members/me`, {
|
||||||
// credentials: 'include',
|
// credentials: 'include',
|
||||||
// });
|
// });
|
||||||
// const data = await res.json();
|
// const data = await res.json();
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export enum ApplicationStatus {
|
|||||||
Denied = "Denied",
|
Denied = "Denied",
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const addr = import.meta.env.VITE_APIHOST;
|
const addr = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
export async function loadApplication(id: number | string): Promise<ApplicationFull | null> {
|
export async function loadApplication(id: number | string): Promise<ApplicationFull | null> {
|
||||||
const res = await fetch(`${addr}/application/${id}`)
|
const res = await fetch(`${addr}/application/${id}`)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export type LOARequest = {
|
|||||||
reason?: string;
|
reason?: string;
|
||||||
};
|
};
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const addr = import.meta.env.VITE_APIHOST;
|
const addr = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
export async function submitLOA(request: LOARequest): Promise<{ id?: number; error?: string }> {
|
export async function submitLOA(request: LOARequest): Promise<{ id?: number; error?: string }> {
|
||||||
const res = await fetch(`${addr}/loa`, {
|
const res = await fetch(`${addr}/loa`, {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export type Member = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const addr = import.meta.env.VITE_APIHOST;
|
const addr = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
export async function getMembers(): Promise<Member[]> {
|
export async function getMembers(): Promise<Member[]> {
|
||||||
const response = await fetch(`${addr}/members`, {
|
const response = await fetch(`${addr}/members`, {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export type Rank = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const addr = import.meta.env.VITE_APIHOST;
|
const addr = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
export async function getRanks(): Promise<Rank[]> {
|
export async function getRanks(): Promise<Rank[]> {
|
||||||
const res = await fetch(`${addr}/ranks`)
|
const res = await fetch(`${addr}/ranks`)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export type Role = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const addr = import.meta.env.VITE_APIHOST;
|
const addr = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
export async function getRoles(): Promise<Role[]> {
|
export async function getRoles(): Promise<Role[]> {
|
||||||
const res = await fetch(`${addr}/roles`)
|
const res = await fetch(`${addr}/roles`)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export type Status = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const addr = import.meta.env.VITE_APIHOST;
|
const addr = import.meta.env.BASE_URL;
|
||||||
|
|
||||||
export async function getAllStatuses(): Promise<Status[]> {
|
export async function getAllStatuses(): Promise<Status[]> {
|
||||||
const res = await fetch(`${addr}/status`)
|
const res = await fetch(`${addr}/status`)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export const useUserStore = defineStore('user', () => {
|
|||||||
|
|
||||||
async function loadUser() {
|
async function loadUser() {
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const res = await fetch(`${import.meta.env.VITE_APIHOST}/members/me`, {
|
const res = await fetch(`${import.meta.env.BASE_URL}/members/me`, {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user