-
Notifications
You must be signed in to change notification settings - Fork 1
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
[BE] 회원가입 API 구현 #29
Merged
Merged
[BE] 회원가입 API 구현 #29
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
959e10d
✨ feat: module, controller, service, entity, repository 초기 설정 및 의존성 주…
jinddings 8fb0b1f
✨ feat: 회원 가입 레포지토리 구현
jinddings d169098
✨ feat: userRepository registerUser 메소드 구현 (#26)
jinddings 643ad3c
Merge branch 'back/main' of https://github.com/boostcampwm-2024/web16…
jinddings a71bf2c
✨ feat: AuthService 회원가입 로직 구현(#26)
jinddings 92c7549
⚙️ chore: AuthModule을 AppModule에 추가(#26)
jinddings bf295a6
✨ feat: AuthController 구현 및 AuthService에서 비밀번호 암호화 로직 추가(#26)
jinddings 226ce86
✨ feat: 가입 요청 유저 정보에 대한 유효성 검사 추가 (#26)
jinddings eee8101
⚙️ chore:lint 실행시 발생하는 오류 수정
jinddings e817f4b
Merge branch 'back/main' into feature/api/register-#26
jinddings 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
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import { Injectable } from '@nestjs/common'; | ||
import { InjectDataSource } from '@nestjs/typeorm'; | ||
import { InjectDataSource, InjectRepository } from '@nestjs/typeorm'; | ||
import { User } from './user.entity'; | ||
import { DataSource, Repository } from 'typeorm'; | ||
import { AuthCredentialsDto } from './dto/auth-credential-dto'; | ||
import { AuthCredentialsDto } from './dto/authCredentials.dto'; | ||
|
||
@Injectable() | ||
export class UserRepository extends Repository<User> { | ||
constructor(@InjectDataSource() dataSource: DataSource) { | ||
super(User, dataSource.createEntityManager()); | ||
} | ||
|
||
async createUser(authCredentialsDto: AuthCredentialsDto): Promise<void> { | ||
async registerUser(authCredentialsDto: AuthCredentialsDto) { | ||
const { email, password } = authCredentialsDto; | ||
const user = this.create({ email, password }); | ||
|
||
await this.save(user); | ||
} | ||
} |
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.
🟢 이런 네이밍 규칙도 나중에 이야기해보면 좋겠네요!
저는 케밥 케이스 방식을 써서
auth-credential.dto
이런 식으로 작성하고 있었거든요!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.
어라? 저도 진님이 하신게 기억나서 고쳐논건데 왜 다시 되돌아 왔는지 모르겠네요 ㅎㅎ
한번 이야기 해보면 좋을거 같아요!