Fix: Intergrasi tampilan ke API

Package.json
Fix: Pem baharuan SDK53 -> SDK54

### No Issue
This commit is contained in:
2025-09-12 15:57:30 +08:00
parent 005b798688
commit 1d2153b253
9 changed files with 593 additions and 18350 deletions

View File

@@ -52,7 +52,13 @@ export async function apiEventUpdateStatus({
}
}
export async function apiEventUpdateData({ id, data }: { id: string; data: any }) {
export async function apiEventUpdateData({
id,
data,
}: {
id: string;
data: any;
}) {
try {
const response = await apiConfig.put(`/mobile/event/${id}`, {
data: data,
@@ -71,7 +77,6 @@ export async function apiEventDelete({ id }: { id: string }) {
throw error;
}
}
export async function apiEventGetAll() {
try {
@@ -81,4 +86,30 @@ export async function apiEventGetAll() {
throw error;
}
}
export async function apiEventJoin({
id,
userId,
}: {
id: string;
userId?: string;
}) {
try {
const response = await apiConfig.post(`/mobile/event/${id}/participants`, {
userId: userId,
});
return response.data;
} catch (error) {
throw error;
}
}
export async function apiEventListOfParticipants({id}: {id: string}){
try {
const response = await apiConfig.get(`/mobile/event/${id}/participants`);
return response.data;
} catch (error) {
throw error;
}
}