Forum
Add: - api-client/api-forum Fix: - Integrasi API: create dan beranda file ### No Issue
This commit is contained in:
21
service/api-client/api-forum.ts
Normal file
21
service/api-client/api-forum.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user