Files
hipmi-mobile/service/api-client/api-master.ts
bagasbanuna 0262423c50 Fix notification to report comment
Fix:
User – Forum (Reporting & Preview)

app/(application)/(user)/forum/[id]/other-report-commentar.tsx

app/(application)/(user)/forum/[id]/other-report-posting.tsx

app/(application)/(user)/forum/[id]/preview-report-posting.tsx

app/(application)/(user)/forum/[id]/report-commentar.tsx

app/(application)/(user)/forum/[id]/report-posting.tsx

Admin – Forum Moderation

app/(application)/admin/forum/[id]/list-report-comment.tsx

app/(application)/admin/forum/report-posting.tsx

Layout

app/(application)/(user)/_layout.tsx

API Client & Admin

service/api-admin/api-admin-forum.ts

service/api-client/api-forum.ts

service/api-client/api-master.ts

Utils

utils/badWordsIndonesia.ts

### No Issue
2026-01-19 17:46:54 +08:00

143 lines
3.4 KiB
TypeScript

import { apiConfig } from "../api-config";
// ================== START MASTER ================== //
export async function apiMasterAppCategory() {
try {
const response = await apiConfig.get(`/mobile/master/app-category`);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER ================== //
// ================== START MASTER PORTFOLIO ================== //
export async function apiMasterBidangBisnis() {
try {
const response = await apiConfig.get(`/master/bidang-bisnis`);
return response.data;
} catch (error) {
throw error;
}
}
export async function apiMasterSubBidangBisnis({ id }: { id?: string }) {
try {
const selectBidangId = id ? `/${id}` : "";
const response = await apiConfig.get(
`/master/sub-bidang-bisnis${selectBidangId}`
);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER PORTFOLIO ================== //
// ================== START MASTER EVENT ================== //
export async function apiMasterEventType() {
try {
const response = await apiConfig.get(`/mobile/master/event-type`);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER EVENT ================== //
// ================== START MASTER COLLABORATION ================== //
export async function apiMasterCollaborationType() {
try {
const response = await apiConfig.get(
`/mobile/master/collaboration-industry`
);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER COLLABORATION ================== //
// ================== START MASTER FORUM ================== //
export async function apiMasterForumReportList() {
try {
const response = await apiConfig.get(`/mobile/master/forum-report`);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER FORUM ================== //
// ================== START MASTER INVESTMENT ================== //
export async function apiMasterInvestment({
category,
}: {
category?:
| "pencarian-investor"
| "periode-deviden"
| "pembagian-deviden"
| string;
}) {
const selectCategory = category ? `?category=${category}` : "";
try {
const response = await apiConfig.get(
`/mobile/master/investment${selectCategory}`
);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER INVESTMENT ================== //
// ================== START MASTER BANK ================== //
export async function apiMasterBank() {
try {
const response = await apiConfig.get(`/mobile/master/bank`);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER BANK ================== //
export async function apiMasterDonation({
category,
}: {
category: "category" | "duration" | "";
}) {
const selectCategory = category ? `?category=${category}` : "";
try {
const response = await apiConfig.get(
`/mobile/master/donation${selectCategory}`
);
return response.data;
} catch (error) {
throw error;
}
}
// ================== END MASTER DONATION ================== //
export async function apiMasterTransaction() {
try {
const response = await apiConfig.get(`/mobile/master/transaction-status`);
return response.data;
} catch (error) {
throw error;
}
}