fix : job

deskripsi:
- page: job-vacancy untuk non user sudah bisa di akses kembali
- tidak menggunakan use server lagi melainkan API
This commit is contained in:
2025-05-26 12:07:00 +08:00
parent 857354c9f6
commit 45105a2d42
7 changed files with 72 additions and 26 deletions

View File

@@ -0,0 +1,16 @@
export async function apiGetNotUserForJob({ id }: { id: string }) {
try {
const response = await fetch(`/api/not-user/job/${id}`);
if (!response.ok) {
const errorData = await response.json().catch(() => null);
console.error("Failed to get job", response.statusText, errorData);
throw new Error(errorData?.message || "Failed to get job");
}
const data = await response.json();
return data;
} catch (error) {
console.error("Error get job:", error);
throw error;
}
}