-
Notifications
You must be signed in to change notification settings - Fork 122
Implemented dynamic profile integration and smart QR improvements #243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
61ca5b6
Implemented profile integration and QR improvements
Kaustav2706 077465b
Merge branch 'main' of https://github.com/Kaustav2706/DevCard into feβ¦
Kaustav2706 5e2ad94
Resolved merge conflicts
Kaustav2706 ac16f90
Resolved upstream merge conflicts
Kaustav2706 719093a
Fixed PR review comments and backend validations
Kaustav2706 fd913dd
Reverted unnecessary schema changes
Kaustav2706 b18a416
Merge branch 'main' into feature/profile-linking
Kaustav2706 58a733e
fix(app): revert test-only guards and restore health check to fix proβ¦
Kaustav2706 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,26 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" /> | ||
| <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0f0f1a" /> | ||
| <meta property="og:type" content="website" /> | ||
| <meta property="og:site_name" content="DevCard" /> | ||
| <meta name="twitter:card" content="summary_large_image" /> | ||
| %sveltekit.head% | ||
| </head> | ||
| <body data-sveltekit-preload-data="hover"> | ||
| <div style="display: contents">%sveltekit.body%</div> | ||
| </body> | ||
| </html> | ||
|
|
||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" /> | ||
| <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0f0f1a" /> | ||
| <meta property="og:type" content="website" /> | ||
| <meta property="og:site_name" content="DevCard" /> | ||
| <meta name="twitter:card" content="summary_large_image" /> | ||
| <script> | ||
| try { | ||
| const saved = localStorage.getItem('devcard-theme'); | ||
| const theme = saved || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'); | ||
| document.documentElement.classList.toggle('dark', theme === 'dark'); | ||
| } catch (e) { } | ||
| </script> | ||
| %sveltekit.head% | ||
| </head> | ||
|
|
||
| <body data-sveltekit-preload-data="hover"> | ||
| <div style="display: contents">%sveltekit.body%</div> | ||
| </body> | ||
|
|
||
| </html> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| export async function apiFetch(path: string, options: RequestInit = {}) { | ||
| // Route all browser fetches through the SvelteKit /api/ proxy gateway | ||
| const cleanPath = path.startsWith('/') ? path.substring(1) : path; | ||
| const url = `/api/${cleanPath}`; | ||
|
|
||
| const headers = new Headers(options.headers); | ||
| if (options.body && !(options.body instanceof FormData) && !headers.has('Content-Type')) { | ||
| headers.set('Content-Type', 'application/json'); | ||
| } | ||
|
|
||
| const response = await fetch(url, { | ||
| ...options, | ||
| headers, | ||
| }); | ||
|
|
||
| if (!response.ok) { | ||
| let errorMsg = 'An error occurred'; | ||
| try { | ||
| const data = await response.json(); | ||
| errorMsg = data.error || errorMsg; | ||
| } catch {} | ||
| throw new Error(errorMsg); | ||
| } | ||
|
|
||
| if (response.status === 204) { | ||
| return null; | ||
| } | ||
|
|
||
| return response.json(); | ||
| } |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break prod.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Harxhit, thanks for catching this! I've pushed a fix in commit 58a733e:
Reverted the NODE_ENV !== 'test' guards around prisma/redis plugin registration β these should always be registered; tests should handle mocking separately
Restored the original health check endpoint with timestamp and service fields
Fixed indentation inconsistencies and removed a leftover debug comment
Please re-review when you get a chance!