Commit Graph

5 Commits

Author SHA1 Message Date
Hiro
2d91e17c3e fix: resolve API inconsistencies found by Mokoto
- Bug 1: No fix needed - frontend already uses PUT for document updates
- Bug 2: Changed folders API to use 'project' param (matches documents)
- Bug 3: GET /folders now works without project filter (lists all folders)

Changes:
- folders.js: Accept 'project' instead of 'projectId', make it optional
- folderService.js: Support listing all folders when projectId is null
- api.js: Updated getFolders() to use 'project' param consistently
2026-03-28 17:36:58 +00:00
Hiro
4e1d4f80cc fix: allow folderId in updateDocument and pass it through route handler
- Add folderId parameter to updateDocument service method
- Extract folderId from request body in PUT /documents/:id route
- Fixes move document to folder functionality
2026-03-28 14:12:42 +00:00
Hiro
b81e670ce4 feat: implement Projects and Folders API (v2 architecture)
- Add projectService.js with full CRUD + tree operations
- Add folderService.js with hierarchical folder support
- Add projects.js routes: GET/POST/PUT/DELETE /projects, /projects/:id/tree, /projects/:id/documents
- Add folders.js routes: GET/POST/PUT/DELETE /folders, /folders/:id/tree, /folders/:id/documents
- Update documentService.js to support projectId/folderId with backwards compat (libraryId)
- Update routes/index.js to mount new routers
- Maintain backwards compatibility with legacy libraryId
- All endpoints tested and working
2026-03-28 13:07:09 +00:00
Erwin
8b0b60db33 fix: add missing libraryService.js and fix two bugs
- Create missing src/services/libraryService.js (was imported but never created)
- Fix readJSONFile import in tagIndexer.js (unused import)
- Fix found.found?.libId typo in deleteDocument (double .found lookup)

These were blocking the application from starting.
2026-03-28 03:31:14 +00:00
Erwin
825dfba2a7 Implement SimpleNote Web API - full REST API with Express
- Express server with CORS, JSON middleware
- Auth middleware (Bearer token)
- Document CRUD with markdown storage
- Library CRUD with nested support
- Tag indexing and search
- Error handler middleware
- Config from env vars
- Init script for data structure
2026-03-28 03:27:27 +00:00