Frontend integration#25
Merged
apalchys merged 19 commits intorolling-scopes-school:mainfrom Dec 29, 2024
Merged
Conversation
apalchys
approved these changes
Aug 28, 2024
Member
apalchys
left a comment
There was a problem hiding this comment.
my comments mostly minor. great job
env.example
Outdated
|
|
||
| APP_URL=http://localhost:4000 | ||
|
|
||
| GITHUB_ACCOUNT_LOGIN=yourGithubLogin |
Member
There was a problem hiding this comment.
I suggest to name AUTH_USERNAME and add a comment, it should be your GitHub username.
I also suggest to group APP_URL, AUTH_USERNAME and AUTH_PASSWORD together with a comment, they are needed to make the script work.
src/auth/auth.service.ts
Outdated
| function encodeUserToken(user) { | ||
| const { id, name, password } = user; | ||
| function encodeUserToken(user: User) { | ||
| const { /*id,*/ name, password } = user; |
Member
There was a problem hiding this comment.
Suggested change
| const { /*id,*/ name, password } = user; | |
| const { name, password } = user; |
lets remove
src/order/services/order.service.ts
Outdated
| import { Injectable } from '@nestjs/common'; | ||
| import { v4 } from 'uuid'; | ||
|
|
||
| import { randomUUID } from 'crypto'; |
Member
There was a problem hiding this comment.
Suggested change
| import { randomUUID } from 'crypto'; | |
| import { randomUUID } from 'node:crypto'; |
minor but I find it's more convenient and readable to prefix node imports with node:
src/cart/services/cart.service.ts
Outdated
| id, | ||
| id: randomUUID(), | ||
| user_id, | ||
| created_at: getDate(), |
Member
There was a problem hiding this comment.
i wonder, why do you need to store date as string and just actual timestamp (Date.now()) ?
Author
There was a problem hiding this comment.
You are right, I forgot update that
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.
For proper work of
ordersendpoint you need also merge this PR rolling-scopes-school/nodejs-aws-shop-react#140P.S.
I don't know what was initial logic of application. So I didn't touch commented code and other stuff that application currently do not use.