Add:
- api-client/api-forum

Fix:
- Integrasi API: create dan beranda file

### No Issue
This commit is contained in:
2025-09-24 17:30:06 +08:00
parent 8c5602b809
commit 54af104f8a
5 changed files with 166 additions and 45 deletions

View File

@@ -0,0 +1,21 @@
import { apiConfig } from "../api-config";
export async function apiForumCreate({ data }: { data: any }) {
try {
const response = await apiConfig.post(`/mobile/forum`, {
data: data,
});
return response.data;
} catch (error) {
throw error;
}
}
export async function apiForumGetAll({search}: {search: string}) {
try {
const response = await apiConfig.get(`/mobile/forum?search=${search}`);
return response.data;
} catch (error) {
throw error;
}
}