Fix: Tampilan yang terintegrasi API - app/(application)/(user)/collaboration/[id]/edit.tsx - app/(application)/admin/collaboration/[id]/[status].tsx - app/(application)/admin/collaboration/[id]/group.tsx - app/(application)/admin/collaboration/[id]/reject-input.tsx - app/(application)/admin/collaboration/group.tsx - app/(application)/admin/collaboration/index.tsx - app/(application)/admin/collaboration/publish.tsx - app/(application)/admin/collaboration/reject.tsx - components/_ShareComponent/Admin/TableValue.tsx - screens/Collaboration/BoxPublishSection.tsx - service/api-admin/api-admin-collaboration.ts ### No Issue
51 lines
969 B
TypeScript
51 lines
969 B
TypeScript
import { apiConfig } from "../api-config";
|
|
|
|
export async function apiAdminCollaboration({
|
|
category,
|
|
}: {
|
|
category: "dashboard" | "publish" | "reject" | "group";
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.get(
|
|
`/mobile/admin/collaboration?category=${category}`
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminCollaborationGetById({
|
|
id,
|
|
category,
|
|
}: {
|
|
id: string;
|
|
category: "publish" | "reject" | "group";
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.get(
|
|
`/mobile/admin/collaboration/${id}?category=${category}`
|
|
);
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|
|
|
|
export async function apiAdminCollaborationReject({
|
|
id,
|
|
data,
|
|
}: {
|
|
id: string;
|
|
data: any;
|
|
}) {
|
|
try {
|
|
const response = await apiConfig.put(`/mobile/admin/collaboration/${id}`, {
|
|
data: data,
|
|
});
|
|
return response.data;
|
|
} catch (error) {
|
|
throw error;
|
|
}
|
|
}
|