-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: Fixed couple duplicate subscription * fix: Change home screen data
- Loading branch information
Showing
9 changed files
with
273 additions
and
150 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
26 changes: 26 additions & 0 deletions
26
src/main/java/com/universe/uni/controller/HomeControllerV1.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.universe.uni.controller; | ||
|
||
import com.universe.uni.controller.docs.HomeControllerV1Contract; | ||
import com.universe.uni.dto.response.HomeResponseDto; | ||
import com.universe.uni.service.HomeService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.ResponseStatus; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api/v1/home") | ||
public class HomeControllerV1 implements HomeControllerV1Contract { | ||
|
||
private final HomeService homeService; | ||
|
||
@GetMapping() | ||
@Override | ||
@ResponseStatus(HttpStatus.OK) | ||
public HomeResponseDto getHome() { | ||
return homeService.getHome(); | ||
} | ||
} |
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
37 changes: 37 additions & 0 deletions
37
src/main/java/com/universe/uni/controller/docs/HomeControllerContract.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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.universe.uni.controller.docs; | ||
|
||
import com.universe.uni.dto.response.HomeResponseDto; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.ResponseStatus; | ||
|
||
@Tag( | ||
name = "Home", | ||
description = "홈 화면에서 필요한 데이터 관련 API 입니다." | ||
) | ||
public interface HomeControllerContract { | ||
|
||
@Operation( | ||
summary = "홈 화면 조회", | ||
description = "사용자는 홈에 필요한 정보를 얻을 수 있다.", | ||
responses = { | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "성공", | ||
content = @Content( | ||
mediaType = MediaType.APPLICATION_JSON_VALUE, | ||
schema = @Schema(implementation = HomeResponseDto.class) | ||
) | ||
) | ||
} | ||
) | ||
@GetMapping() | ||
@ResponseStatus(HttpStatus.OK) | ||
HomeResponseDto getHome(); | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/com/universe/uni/controller/docs/HomeControllerV1Contract.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.universe.uni.controller.docs; | ||
|
||
import com.universe.uni.dto.response.HomeResponseDto; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.ResponseStatus; | ||
|
||
@Tag( | ||
name = "Home", | ||
description = "홈 화면에서 필요한 데이터 관련 API 입니다." | ||
) | ||
public interface HomeControllerV1Contract { | ||
@Operation( | ||
summary = "홈 화면 조회", | ||
description = "사용자는 홈에 필요한 정보를 얻을 수 있다.", | ||
responses = { | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "성공", | ||
content = @Content( | ||
mediaType = MediaType.APPLICATION_JSON_VALUE, | ||
schema = @Schema(implementation = HomeResponseDto.class) | ||
) | ||
) | ||
} | ||
) | ||
@GetMapping() | ||
@ResponseStatus(HttpStatus.OK) | ||
HomeResponseDto getHome(); | ||
} |
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
Oops, something went wrong.