feat: add timestamp header helper for public creator responses#99
Open
johnsmccain wants to merge 4 commits intoaccesslayerorg:mainfrom
Open
feat: add timestamp header helper for public creator responses#99johnsmccain wants to merge 4 commits intoaccesslayerorg:mainfrom
johnsmccain wants to merge 4 commits intoaccesslayerorg:mainfrom
Conversation
|
@johnsmccain Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
@johnsmccain fix merge conflicts |
Author
|
Done |
Contributor
|
@johnsmccain fix merge conflict and send link to the group. Check issue description for link |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds a small utility for attaching
X-Response-Timestampheaders to public creator-facing responses, and fixes the Prisma multi-file schema client generation that was blocking the build.Changes
src/utils/timestamp-headers.utils.ts(new)Centralizes timestamp header logic in one place:
RESPONSE_TIMESTAMP_HEADER— the header name constantformatTimestampHeader(date?)— pure formatter, returns ISO 8601 stringattachTimestampHeader(res, date?)— sets the header on an Express responsesrc/modules/creators/creators.controllers.tsCalls
attachTimestampHeader(res)beforesendSuccessin bothhttpListCreatorsandhttpGetCreatorStats.src/modules/creator/creator.controller.tsCalls
attachTimestampHeader(res)beforesendSuccessinlistCreators.prisma/schema/schema.prismaAdded
previewFeatures = ["prismaSchemaFolder"]to the generator block soprisma generatepicks up all model files (user.prisma,creator.prisma,wallet.prisma) when pointed at the schema directory. Without this the generated client was missing all models and the build failed.How to test
Any public creator list or stats response will now include an
X-Response-Timestampheader with the current UTC time in ISO 8601 format.Commits
826af55feat: add timestamp header helper for public creator responses6ea35d1fix: enable prismaSchemaFolder to include all model files in client generationClose #77