Conversation
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.
This pull request includes significant changes to the
apps/apidirectory, focusing on refactoring route imports, adding middleware for locale handling, and updating route handlers to use the new middleware. The most important changes include moving route files, creating a new middleware for initializing the Faker instance, and updating route handlers to use the context variable for Faker.Route refactoring:
apps/api/main.ts: Changed the import paths for all route files to use theroutesdirectory instead of the previous structure.apps/api/main.ts: Updated theHonoinstance to use a newHonoEnvtype and renamed the instance fromfakertofakerApi.Middleware addition:
apps/api/middlewares/init-faker.ts: Added a new middleware to initialize the Faker instance with locale support based on theAccept-Languageheader.Route handler updates:
apps/api/routes/airline.ts: Updated all route handlers to usec.var.fakerinstead of directly importingfaker. [1] [2] [3] [4] [5] [6] [7] [8]apps/api/routes/animal.ts: Updated all route handlers to usec.var.fakerinstead of directly importingfaker. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]apps/api/routes/book.ts: Updated all route handlers to usec.var.fakerinstead of directly importingfaker. [1] [2] [3] [4] [5] [6] [7]apps/api/routes/color.ts: Updated the route handler to usec.var.fakerinstead of directly importingfaker.