Commit Graph

13 Commits

Author SHA1 Message Date
jason a9df9c0cf4 Harden API, data layer, and autosave; add validation, pagination, migrations
Build and Push Docker Image / build (push) Successful in 2m26s
- Enforce task ownership on PATCH/DELETE /api/tasks (was: any signed-in
  user could edit or delete anyone's tasks)
- Validate all API request bodies with zod; escape user content and
  restrict links to http(s) in the Drive export; block reverting a
  SUBMITTED report
- Add @@unique([userId, date]) on Report with upsert to eliminate the
  duplicate-daily-report race; switch startup from
  `prisma db push --accept-data-loss` to `prisma migrate deploy` with
  automatic baselining of existing databases (dedup migration merges
  any pre-existing duplicates)
- Autosave: re-queue and retry failed task saves with a visible
  saving/error indicator instead of silently dropping edits
- Paginate and filter GET /api/reports (?date, ?mine, ?q, ?take,
  ?cursor); report form fetches only today's report, admin dashboard
  uses server-side search + Load more
- Type the frontend and lib layer (DTOs in src/types/api.ts); zero
  eslint errors
- Update README and Unraid guide for migrations, upgrade path, and API

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-01 19:43:36 -05:00
jason c0198df6d9 pretty it up 2026-03-13 16:16:59 -05:00
jason f1a3a31a94 fixes 2026-03-13 16:00:33 -05:00
jason 707f632d34 admin board 2026-03-13 11:39:46 -05:00
jason 0e2dc27779 timezone 2026-03-13 11:18:11 -05:00
jason b2df27cfc5 multi-file update 2026-03-13 11:13:45 -05:00
jason 04ebc91e9f fix: include user relation in admin reports query to resolve Unknown User display
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 07:29:55 -05:00
jason 19b1f26254 fix: read Google access_token from Account table, not getToken()
With strategy:"database" there is no JWT cookie, so getToken() always
returns null. The Google access_token is stored in the Account table by
the PrismaAdapter. Query it directly via prisma.account.findFirst()
instead of the JWT helper.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-13 00:56:33 -05:00
jason 1d7c564c4a no turbo 2026-03-12 19:59:59 -05:00
jason 7886d60827 more 2026-03-12 19:49:59 -05:00
jason ebc0c61da4 routes fix 2026-03-12 19:47:28 -05:00
jason 7d7c34bcb1 docker fixes 2026-03-12 19:12:44 -05:00
jason 4982e5392e initial commit 2026-03-12 17:09:22 -05:00