-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from tukcomCD2024/Dev-backend
Dev backend
- Loading branch information
Showing
27 changed files
with
668 additions
and
224 deletions.
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
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
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
29 changes: 0 additions & 29 deletions
29
...d/core/src/main/java/com/rollthedice/backend/domain/notification/entity/Notification.java
This file was deleted.
Oops, something went wrong.
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
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
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
15 changes: 15 additions & 0 deletions
15
...d/core/src/main/java/com/rollthedice/backend/global/oauth2/controller/AuthController.java
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,23 +1,38 @@ | ||
package com.rollthedice.backend.global.oauth2.controller; | ||
|
||
import com.rollthedice.backend.domain.member.dto.MemberUpdateDto; | ||
import com.rollthedice.backend.domain.member.service.MemberService; | ||
import com.rollthedice.backend.global.annotation.LoginMemberEmail; | ||
import com.rollthedice.backend.global.oauth2.dto.LoginRequest; | ||
import com.rollthedice.backend.global.oauth2.service.AuthService; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequiredArgsConstructor | ||
public class AuthController { | ||
private final AuthService authService; | ||
private final MemberService memberService; | ||
|
||
@PostMapping("/login") | ||
public ResponseEntity<HttpStatus> login(@RequestBody LoginRequest request, HttpServletResponse response) { | ||
authService.authenticateOrRegisterUser(request, response); | ||
return new ResponseEntity<>(HttpStatus.OK); | ||
} | ||
|
||
@PostMapping("/oauth2/sign-up") | ||
public ResponseEntity<HttpStatus> updateMember(@LoginMemberEmail String email, | ||
@RequestBody MemberUpdateDto memberUpdateDto) { | ||
memberService.update(memberUpdateDto); | ||
|
||
return ResponseEntity.status(HttpStatus.OK).build(); | ||
} | ||
|
||
} |
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
109 changes: 0 additions & 109 deletions
109
backend/core/src/test/java/com/rollthedice/backend/domain/auth/AuthTest.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.