Endpoint update with '/api' prepend
This commit is contained in:
@@ -91,7 +91,7 @@ async function apiFetch<T>(
|
||||
* Ottiene le informazioni sulla sala e la riunione
|
||||
*/
|
||||
export async function getRoomInfo(): Promise<RoomInfo> {
|
||||
return apiFetch<RoomInfo>('/info-room');
|
||||
return apiFetch<RoomInfo>('/api/info-room');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,7 +104,7 @@ export async function loginValidator(
|
||||
): Promise<LoginResponse> {
|
||||
log(`Login attempt for badge: ${badge}`);
|
||||
const payload: LoginRequest = {badge, password};
|
||||
return apiFetch<LoginResponse>('/login-validate', {
|
||||
return apiFetch<LoginResponse>('/api/login-validate', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
@@ -116,7 +116,7 @@ export async function loginValidator(
|
||||
*/
|
||||
export async function getUserByBadge(badgeCode: string): Promise<User> {
|
||||
log(`Fetching anagrafica for badge: ${badgeCode}`);
|
||||
return apiFetch<User>(`/anagrafica/${encodeURIComponent(badgeCode)}`);
|
||||
return apiFetch<User>(`/api/anagrafica/${encodeURIComponent(badgeCode)}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,7 +132,7 @@ export async function requestEntry(
|
||||
user_badge: userBadge,
|
||||
validator_password: validatorPassword,
|
||||
};
|
||||
return apiFetch<EntryResponse>('/entry-request', {
|
||||
return apiFetch<EntryResponse>('/api/entry-request', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user