new fix for note js
This commit is contained in:
parent
74b0cb4cbb
commit
36c350437b
@ -362,7 +362,10 @@ async function handleAddNote(e) {
|
|||||||
return showMessage('Please select an employee.', 'error');
|
return showMessage('Please select an employee.', 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await apiCall('/api/admin/notes', 'POST', { userId, noteText });
|
// BEFORE: const res = await apiCall('/api/admin/notes', 'POST', { userId, noteText });
|
||||||
|
// AFTER (Corrected):
|
||||||
|
const res = await apiCall('/admin/notes', 'POST', { userId, noteText });
|
||||||
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
showMessage(res.data.message, 'success');
|
showMessage(res.data.message, 'success');
|
||||||
e.target.reset();
|
e.target.reset();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user