diff --git a/server.js b/server.js index adf1971..059b66e 100644 --- a/server.js +++ b/server.js @@ -352,21 +352,6 @@ app.delete('/api/admin/logs/:id', authenticateToken, requireRole('admin'), async }); // Admin creates a note for an employee -async function handleAddNote(e) { - e.preventDefault(); - const userId = e.target.elements['note-user-select'].value; - const noteText = e.target.elements['note-text'].value; - - if (!userId) { - return showMessage('Please select an employee.', 'error'); - } - - const res = await apiCall('/api/admin/notes', 'POST', { userId, noteText }); - if (res.success) { - showMessage(res.data.message, 'success'); - e.target.reset(); - } -} app.post('/api/admin/notes', authenticateToken, requireRole('admin'), async (req, res) => { try { const { userId, noteText } = req.body;