-
Notifications
You must be signed in to change notification settings - Fork 0
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
Antti | api/user #18
Merged
Merged
Antti | api/user #18
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
8cb4efd
Created a new folder 'users' inside the api folder. Added the index f…
anttiasmala dbd9c58
Created [uuid].ts file into api/users
anttiasmala 08d2f7e
Copied request handlers from 'gifts'
anttiasmala 100c393
Created types for user and creating user
anttiasmala 486b359
Added user to not required field on CreateGift type
anttiasmala ea88381
Rewrote handleGET
anttiasmala 5745929
Rewrote handlePOST
anttiasmala 309784a
Copied this file from api/gifts/[uuid].ts
anttiasmala 70251f9
Rewrote handleGET
anttiasmala 6515f50
Rewrote handlePATCH
anttiasmala d6a5e94
Rewrote handlePUT
anttiasmala c3f4d4c
Rewrote handleDELETE
anttiasmala 9f9f078
Created a new function for checking if email can be used for creating…
anttiasmala c72e3db
Changed regex pattern. AI made that for me
anttiasmala b1277f3
Lint fixes
anttiasmala 92d3785
Installed Bcrypt and types for Bcrypt
anttiasmala af38e19
Added an import for bcrypt. Created function for hashing the password…
anttiasmala 6d40868
Added some test requests into api.rest
anttiasmala 2404aba
Changed 'gifts' to 'users' in the GET request's URL
anttiasmala 25c9d27
Changed a full bcrypt import to only import 'hash'
anttiasmala bd8b9de
Changed email to be added as lowercased to the database
anttiasmala 0aa81ae
Deleted isEmailFound check due to no need. Prisma handles this
anttiasmala e93272d
Added known Prisma errors
anttiasmala d1e570e
Added a DELETE request to api.rest
anttiasmala a03f714
Removed the IDs from requests due to they're not same for everyone
anttiasmala b89bc79
Added some comments to Requests
anttiasmala e00dc25
Changed PATCH request to PUT and added 'gift' field
anttiasmala 77cfb55
Added a placeholder email field to User's PATCH request
anttiasmala 1ff9c66
Added a DELETE request for Gift
anttiasmala 6c97067
Changed PATCH request's email change to be lowercased
anttiasmala 143cfcb
Changed how PUT request works a bit
anttiasmala 81a110c
Added PUT requests to api.rest for future use
anttiasmala 0eba44f
Changed isEmailValid function to not be a Promise anymore
anttiasmala 1160168
Added values for PATCH request, were missing for some reason
anttiasmala 4ebabcc
Fixed Invalid JSON error
anttiasmala 5c973c1
Merge branch 'main' into antti/user-api
anttiasmala f2e7d08
Deleted unneccessary comments in api.rest
anttiasmala ffae3d5
Added mark to separate User requests and Gift requests
anttiasmala c2ea747
Added placeholder ID's to requests
anttiasmala b896e73
Made req.body as User to be fully optional. Made email to have condit…
anttiasmala 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 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
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.
Muokkasin sitten tämän PUT-requestin toimimaan PATCH-requestina, koska nyt sieltä valitaan mitkä kentät halutaan tietokantaan muokata 😅 🤣
Annetaanko tässä kohtaa asian olla ja korjataan #19
issusessa
vai onko järkevämpi korjata heti kutakuinkin näin: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.
Annetaan olla tässä kohtaa ja korjataan myöhemmin.