upd: menerapkan log pada semua aksi

This commit is contained in:
2026-04-13 16:42:36 +08:00
parent 14a9e2c687
commit 2cf96135f9
8 changed files with 121 additions and 31 deletions

View File

@@ -169,6 +169,12 @@ function UsersIndexPage() {
const result = await res.json()
if (result.success) {
await fetch(API_URLS.createLog(), {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ type: 'CREATE', message: `Didaftarkan user (${appId}) baru: ${form.name}-${form.nik}` })
}).catch(console.error)
notifications.show({
title: 'Success',
message: 'User has been created successfully.',
@@ -252,6 +258,12 @@ function UsersIndexPage() {
const result = await res.json()
if (result.success) {
await fetch(API_URLS.createLog(), {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ type: 'UPDATE', message: `Data user (${appId}) diperbarui: ${editForm.name}-${editForm.id}` })
}).catch(console.error)
notifications.show({
title: 'Success',
message: 'User has been updated successfully.',