Skip to content
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

M3-238 앱 버전 api #63

Merged
merged 10 commits into from
Aug 13, 2024
Merged

M3-238 앱 버전 api #63

merged 10 commits into from
Aug 13, 2024

Conversation

tkdals802
Copy link
Contributor

작업 내용*

  • version api 작성
  • 버전을 post, get하는 api 작성

고민한 내용*

  • 버전을 get 할때는 가장 최신 날짜의 버전을 가져오도록 했다.
  • 현재 버전 하나만 저장하도록 할까 했으나, 과거의 버전도 저장해두면 쓸 일이 있지 않을까 해서 날짜랑 버전을 저장하도록 했다

리뷰 요구사항

  • 변수, 함수, 로직

@tkdals802 tkdals802 requested review from qjvk2880 and koomin1227 and removed request for qjvk2880 August 10, 2024 18:52
@tkdals802 tkdals802 self-assigned this Aug 10, 2024
Copy link

github-actions bot commented Aug 10, 2024

📝 테스트 커버리지 리포트

Overall Project 71.8% -0.41% 🍏
Files changed 72.22%

File Coverage
VersionService.java 83.33% -16.67% 🍏
VersionController.java 50% -50%

Copy link

github-actions bot commented Aug 10, 2024

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

Comment on lines 26 to 34
@Operation(summary = "앱 버전 post", description = "현재 앱 버전을 등록한다.")
@PostMapping("/version")
public Response<?> postVersion(
@Parameter(description = "버전 저장", required = true)
@RequestBody VersionRequest versionRequest
) {
versionService.postVersion(versionRequest);
return Response.createSuccessWithNoData();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

시큐리티 적용없이 뚫려있는데 아무나 버전 바꾸면 어떻게되나요?

@tkdals802 tkdals802 changed the title Feature/m3 238 app version api M3-238 앱 버전 api Aug 11, 2024
@koomin1227 koomin1227 self-requested a review August 11, 2024 14:01
Copy link
Member

@koomin1227 koomin1227 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

생각해보니 서버가 최신버전 을 주는게 아니라 클라에서 주는 버전을 최신인지 아닌지 검사하는게 좋을 것 같네요.

서버가 최신 버전을 주면 클라에서는 따로 여러 복잡한 로직을 적용못하고 배포 한시점의 로직만 가지고 판단 할 수 밖에 없을 것 같네요

Comment on lines 1 to 18
package com.m3pro.groundflip.domain.dto.version;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Schema(title = "앱 버전 등록")
public class VersionRequest {
@Schema(description = "앱 버전", example = "1.0.1")
private String version;

}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

안쓰는데 남아있네요

public class VersionController {
private final VersionService versionService;

@Operation(summary = "앱 버전 get", description = "현재 앱 버전을 가져온다.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앱 버전 get 말고 "업데이트 여부 확인" 같은 표현으로 바꾸는게 좋을 것 같네요

@tkdals802 tkdals802 merged commit 26ab1d0 into develop Aug 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants