UI – User Notifications - app/(application)/(user)/notifications/index.tsx - service/api-notifications.ts - screens/Notification/ UI – Portofolio (User) - app/(application)/(user)/portofolio/[id]/create.tsx - app/(application)/(user)/portofolio/[id]/edit.tsx - app/(application)/(user)/portofolio/[id]/list.tsx - screens/Portofolio/BoxPortofolioView.tsx - screens/Portofolio/ViewListPortofolio.tsx - screens/Profile/PortofolioSection.tsx - service/api-client/api-portofolio.ts Forum & User Search - screens/Forum/DetailForum2.tsx - screens/Forum/ViewBeranda3.tsx - screens/UserSeach/MainView_V2.tsx Constants & Docs - constants/constans-value.ts - docs/prompt-for-qwen-code.md ### No Issue
67 lines
1.3 KiB
TypeScript
67 lines
1.3 KiB
TypeScript
import { apiConfig } from "../api-config";
|
|
|
|
export async function apiPortofolioCreate({ data }: { data: any }) {
|
|
try {
|
|
const response = await apiConfig.post(`/mobile/portofolio`, {
|
|
data: data,
|
|
});
|
|
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiGetPortofolio({ id, page = "1" }: { id: string; page?: string }) {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/portofolio?id=${id}&page=${page}`);
|
|
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiGetOnePortofolio({ id }: { id: string }) {
|
|
try {
|
|
const response = await apiConfig.get(`/mobile/portofolio/${id}`);
|
|
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiDeletePortofolio({ id }: { id: string }) {
|
|
try {
|
|
const response = await apiConfig.delete(`/mobile/portofolio/${id}`);
|
|
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiUpdatePortofolio({
|
|
id,
|
|
data,
|
|
category,
|
|
}: {
|
|
id: string;
|
|
data: any;
|
|
category: "detail" | "medsos" | "logo";
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.put(
|
|
`/mobile/portofolio/${id}?category=${category}`,
|
|
{
|
|
data: data,
|
|
}
|
|
);
|
|
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|