feat: finish profile route api route with database calls #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes across different files to enhance functionality, improve configuration, and update dependencies. The most important changes include updates to the
next.config.ts
andpackage.json
files, modifications to the Prisma schema, and the addition of new API routes.Configuration Updates:
next.config.ts
: Addedpino
andpino-pretty
toserverExternalPackages
for better logging support.package.json
: Updated build script to includeprisma generate
, changedlint:fix
script to target thesrc
directory, and added new dependencies including@scalar/nextjs-api-reference
andjstoxml
.Prisma Schema Changes:
prisma/schema.prisma
: Added default value "en" tolanguage
field inProfile
model, and addedcreatedAt
andupdatedAt
fields toViewingHistory
andWatchlist
models. [1] [2] [3]API Route Additions:
src/app/api/health/route.ts
: Added a new health check endpoint that returns a status of 'ok'.src/app/api/v1/documentation/route.ts
: Added a new endpoint to serve API documentation using@scalar/nextjs-api-reference
.API Route Removals:
src/app/api/profiles/[id]/route.ts
: Removed individual profile-related API routes (GET
,PUT
,DELETE
). (src/app/api/profiles/[id]/route.tsL1-L51)src/app/api/profiles/route.ts
: Removed profile-related API routes (GET
,POST
) that handled fetching and creating profiles.