fix: edit api in category landing page
This commit is contained in:
parent
fd6ffda5a3
commit
942b00521c
|
|
@ -1,6 +1,7 @@
|
|||
import {
|
||||
getCategoryData,
|
||||
getPublicCategoryData,
|
||||
getPublicCategoryDataNew,
|
||||
} from "@/service/landing/landing";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Reveal } from "./Reveal";
|
||||
|
|
@ -39,7 +40,7 @@ const ContentCategory = (props: { group?: string; type: string }) => {
|
|||
initFetch();
|
||||
}, []);
|
||||
const initFetch = async () => {
|
||||
const response = await getPublicCategoryData(
|
||||
const response = await getPublicCategoryDataNew(
|
||||
props.group == "mabes"
|
||||
? ""
|
||||
: props.group == "polda" && poldaName && String(poldaName)?.length > 1
|
||||
|
|
|
|||
|
|
@ -68,6 +68,18 @@ export async function getPublicCategoryData(
|
|||
}&group=${group}&type=${type}&isInt=${isInt}`
|
||||
);
|
||||
}
|
||||
export async function getPublicCategoryDataNew(
|
||||
group: any = "",
|
||||
type: string = "",
|
||||
isInt: boolean = false,
|
||||
page: number = 1
|
||||
) {
|
||||
return await httpGetInterceptor(
|
||||
`media/categories/list/publish?enablePage=1&size=12&sort=desc&sortBy=id&page=${
|
||||
page - 1
|
||||
}&group=${group}&type=${type}&isInt=${isInt}`
|
||||
);
|
||||
}
|
||||
|
||||
export async function getCategoryData() {
|
||||
return await httpGetInterceptor(
|
||||
|
|
|
|||
Loading…
Reference in New Issue