|
| 1 | +package devkor.com.teamcback.domain.notification.controller; |
| 2 | + |
| 3 | +import devkor.com.teamcback.domain.koyeon.entity.Koyeon; |
| 4 | +import devkor.com.teamcback.domain.notification.service.VersionService; |
| 5 | +import devkor.com.teamcback.global.response.CommonResponse; |
| 6 | +import io.swagger.v3.oas.annotations.Operation; |
| 7 | +import io.swagger.v3.oas.annotations.media.Content; |
| 8 | +import io.swagger.v3.oas.annotations.media.Schema; |
| 9 | +import io.swagger.v3.oas.annotations.responses.ApiResponse; |
| 10 | +import io.swagger.v3.oas.annotations.responses.ApiResponses; |
| 11 | +import lombok.RequiredArgsConstructor; |
| 12 | +import org.springframework.web.bind.annotation.GetMapping; |
| 13 | +import org.springframework.web.bind.annotation.RequestMapping; |
| 14 | +import org.springframework.web.bind.annotation.RestController; |
| 15 | + |
| 16 | +@RestController |
| 17 | +@RequiredArgsConstructor |
| 18 | +@RequestMapping("/api/notifications/version") |
| 19 | +public class VersionController { |
| 20 | + |
| 21 | + private final VersionService versionService; |
| 22 | + |
| 23 | + /*** |
| 24 | + * 앱 버전 조회 |
| 25 | + */ |
| 26 | + @GetMapping("") |
| 27 | + @Operation(summary = "앱 버전 조회", description = "버전 다른 경우 업데이트 필요 알림") |
| 28 | + @ApiResponses(value = { |
| 29 | + @ApiResponse(responseCode = "200", description = "정상 처리 되었습니다."), |
| 30 | + @ApiResponse(responseCode = "404", description = "Not Found", |
| 31 | + content = @Content(schema = @Schema(implementation = CommonResponse.class))), |
| 32 | + }) |
| 33 | + public CommonResponse<String> getVersion() { |
| 34 | + return CommonResponse.success(versionService.getVersion()); |
| 35 | + } |
| 36 | +} |
0 commit comments