new fix for note js

This commit is contained in:
chris 2025-08-02 09:47:16 -04:00
parent 74b0cb4cbb
commit 36c350437b

View File

@ -362,7 +362,10 @@ async function handleAddNote(e) {
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) {
showMessage(res.data.message, 'success');
e.target.reset();