upd: menerapkan log pada semua aksi
This commit is contained in:
@@ -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.',
|
||||
|
||||
Reference in New Issue
Block a user