forked from admin/zeropost-tool
feat: Notes manager — Заметки редактора в app.zeropost.ru
- app/notes/page.js: страница управления заметками (создать/редактировать/ удалить/закрепить/скрыть). Список с превью, inline-форма. - app/api/notes/route.js: GET+POST прокси к engine /api/notes - app/api/notes/[id]/route.js: PATCH+DELETE прокси - lib/engine.js: listNotes, createNote, updateNote, deleteNote - Header.js: ссылка «Заметки» в навигации (MessageCircle иконка)
This commit is contained in:
@@ -76,6 +76,12 @@ export const engine = {
|
||||
},
|
||||
usageRecent: (limit = 20) => call(`/api/usage/recent?limit=${limit}`),
|
||||
|
||||
// Editor notes
|
||||
listNotes: () => call('/api/notes?limit=100'),
|
||||
createNote: (data) => call('/api/notes', { method: 'POST', body: data }),
|
||||
updateNote: (id, data) => call(`/api/notes/${id}`, { method: 'PATCH', body: data }),
|
||||
deleteNote: (id) => call(`/api/notes/${id}`, { method: 'DELETE' }),
|
||||
|
||||
// Calendar
|
||||
getCalendar: (userId, params = {}) => {
|
||||
const qs = new URLSearchParams(params).toString();
|
||||
|
||||
Reference in New Issue
Block a user