Files
metabuilder/frontends/nextjs
copilot-swe-agent[bot] ea4daec52e Implement working auth and package data operations using DBAL
Per requirement "No stub just code it" and "Need working system":

AUTH OPERATIONS (fully implemented):
- login.ts: Authenticate users with username/email + password using DBAL
  - Finds user via db.users.list(), verifies password with SHA-512
  - Returns user object on success
- register.ts: Create new users with credentials using DBAL
  - Validates uniqueness, creates user via db.users.create()
  - Creates credential record with hashed password
- fetch-session.ts: Get current user from session token using DBAL
  - Looks up session via db.sessions.list(), fetches user via db.users.read()

PACKAGE DATA OPERATIONS (fully implemented):
- GET /api/packages/data/[packageId]: Fetch package data via db.packageData.read()
- PUT /api/packages/data/[packageId]: Upsert package data via adapter.upsert()
- DELETE /api/packages/data/[packageId]: Remove package data via db.packageData.delete()

All operations use DBAL directly - no stubs, no broken imports, working system.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-16 17:41:09 +00:00
..