Merged
Conversation
The router profileRouter handles the petitions for user information as well as to update the info of this attribute.
Oscar-gg
approved these changes
Jun 17, 2025
src/server/api/routers/profile.ts
Outdated
|
|
||
| export const profileRouter = createTRPCRouter({ | ||
| getById: protectedProcedure.input(z.string()).query(async ({ ctx, input }) => { | ||
| return ctx.db.user.findUnique({ where: { id: input }, include: { accounts: true, sessions: false, solvedProblems: true } }); |
Member
There was a problem hiding this comment.
add an await so that you don't return a promise
src/server/api/routers/profile.ts
Outdated
| })) | ||
| .mutation(async ({ ctx, input }) => { | ||
| const { id, ...data } = input; | ||
| return ctx.db.user.update({ where: { id }, data }); |
Now there is a Profile Card to use. It needs to be done a pop up when it is clicked the user. In case the it can't be done, it just needs to be linked the actual page with the click on the profile
GilMM27
requested changes
Jun 25, 2025
Contributor
GilMM27
left a comment
There was a problem hiding this comment.
Fix build and pr description
Set an await in async functions to not let them be promises
Ale-Coeto
approved these changes
Jun 27, 2025
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.
The route to profile infromation and edition of the leetcode user has been created.
The frontend for this routers is also added as a pop up at the User navbar.
This pop up also added has the sign out button