Commit Graph

6 Commits

Author SHA1 Message Date
Nils-Johan Gynther 722440b9b5 fix: konvertera alla API route handlers till withAuth wrapper
Ersätter getAuthHeaders() + auth() standalone med withAuth() wrapper
i alla route handlers. Auth() standalone fungerar inte korrekt i
Next.js 16 + NextAuth beta.28 pga async cookies() kompatibilitet.
withAuth() använder auth() i wrapper-form sa att request.auth
populeras direkt av NextAuth.

Pavaerkade filer: 27 route handlers + ny lib/with-auth.ts
2026-04-19 21:11:14 +02:00
Nils-Johan Gynther 4250b8d2bc fix(imports): update import path for auth module in products-create and products-update routes 2026-04-19 17:38:20 +02:00
Nils-Johan Gynther 2a412406e2 fix(imports): update import path for auth module in product create and update routes 2026-04-19 17:36:11 +02:00
Nils-Johan Gynther c970a5805f refactor(auth): replace import path for getAuthHeaders with auth function in product routes 2026-04-19 17:34:34 +02:00
Nils-Johan Gynther 16703bb8eb fix(imports): correct import path for getAuthHeaders in product create and update routes 2026-04-19 17:33:39 +02:00
Nils-Johan Gynther 4bf5733c76 feat(api): implement product creation and category update endpoints 2026-04-19 17:32:55 +02:00