Fix Routing Folder API Admin

This commit is contained in:
2025-02-17 01:13:30 +08:00
parent 83ee4e257b
commit 0be007d25e
20 changed files with 38 additions and 37 deletions

View File

@@ -76,7 +76,7 @@ export default function AdminJob_ViewTavleReview() {
const loadInitialData = async () => {
try {
const response = await apiGetAdminJobByStatus({
status: "Review",
name: "Review",
page: `${activePage}`,
search: isSearch
})

View File

@@ -56,7 +56,7 @@ function TableStatus() {
const loadInitialData = async () => {
try {
const response = await apiGetAdminJobByStatus({
status: "Publish",
name: "Publish",
page: `${activePage}`,
search: isSearch
})

View File

@@ -64,7 +64,7 @@ function TableStatus() {
const loadInitialData = async () => {
try {
const response = await apiGetAdminJobByStatus({
status: "Reject",
name: "Reject",
page: `${activePage}`,
search: isSearch
});

View File

@@ -39,11 +39,11 @@ const apiGetAdminJobArsipCount = async () => {
};
const apiGetAdminJobByStatus = async ({
status,
name,
page,
search
}: {
status: "Publish" | "Review" | "Reject";
name: "Publish" | "Review" | "Reject";
page: string;
search: string;
}) => {
@@ -53,7 +53,7 @@ const apiGetAdminJobByStatus = async ({
const isPage = page ? `?page=${page}` : "";
const isSearch = search ? `&search=${search}` : "";
const response = await fetch(
`/api/admin/job/${status}${isPage}${isSearch}`,
`/api/admin/job/status/${name}${isPage}${isSearch}`,
{
headers: {
"Content-Type": "application/json",