Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/main/java/mutsa/server/controller/UsersController.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
import org.apache.coyote.Response;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/users")
Expand All @@ -22,13 +19,13 @@ public class UsersController {

private final UsersService usersService;

@GetMapping("/signup")
@PostMapping("/signup")
public ResponseEntity<ApiResponse<SignUpResponsePayload>> signUp(@RequestBody SignUpRequest signUpRequest){
SignUpResponsePayload signUpResponsePayload=usersService.save(signUpRequest);
return ResponseEntity.ok(ApiResponse.ok("닉네임 생성 성공",signUpResponsePayload));
}

@GetMapping("/login")
@PostMapping("/login")
public ResponseEntity<ApiResponse<LoginResponsePayload>> login(@RequestBody LoginRequest loginRequest){
LoginResponsePayload loginResponsePayload=usersService.login(loginRequest);
if (loginResponsePayload.getNickname() == null) {
Expand Down
7 changes: 4 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect

spring.datasource.username=root
spring.datasource.password=mamavvbb80!
spring.datasource.password=root

spring.cloud.aws.credentials.access-key=${AWS_ACCESS_KEY}
spring.cloud.aws.credentials.secret-key=${AWS_SECRET_KEY}

spring.cloud.aws.credentials.access-key=AKIAZVUEKDRH7LNRLA66
spring.cloud.aws.credentials.secret-key=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
spring.cloud.aws.region.static=ap-northeast-2
spring.cloud.aws.s3.bucket=shinchonton