Refactor API integration and data fetching for genre, novel, and chapter pages

- Replace Prisma database calls with API fetches from the reader API in GenreDetailPage, GenresPage, SearchPage, ChapterReaderPage, and NovelDetailPage.
- Introduce new utility functions for API requests in server-api.ts, including error handling.
- Update authentication flow in auth.ts to sync Google login with the reader API.
- Modify NextAuth session and JWT types to include additional user information.
- Clean up unused imports and code related to Prisma and MongoDB connections.
- Adjust the configuration in next.config.mjs to remove unnecessary API routes.
This commit is contained in:
2026-03-30 13:54:51 +07:00
parent f9bb247ff1
commit 41aca718c9
12 changed files with 515 additions and 749 deletions
-4
View File
@@ -40,10 +40,6 @@ const nextConfig = {
source: "/api/health",
destination: `${readerApiOrigin}/api/health`,
},
{
source: "/api/mod/:path*",
destination: `${readerApiOrigin}/api/mod/:path*`,
},
{
source: "/api/dev/:path*",
destination: `${readerApiOrigin}/api/dev/:path*`,