-
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.
Browse files
Browse the repository at this point in the history
feat - ๋๋ฏธ ์ฑ ์์ฑ api ๊ตฌํ
- Loading branch information
Showing
5 changed files
with
82 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package sopt.org.HMH.domain.dummy; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Deprecated | ||
@Getter | ||
@AllArgsConstructor | ||
public class DummyApp { | ||
String appName; | ||
String appImageUrl; | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/sopt/org/HMH/domain/dummy/DummyAppController.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,21 @@ | ||
package sopt.org.HMH.domain.dummy; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import sopt.org.HMH.global.common.response.ApiResponse; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api/v1/dummy") | ||
@Deprecated | ||
public class DummyAppController { | ||
@GetMapping("/app") | ||
public ResponseEntity<ApiResponse<?>> orderModifyDailyChallenge() { | ||
return ResponseEntity | ||
.status(DummyAppSuccess.GET_DUMMY_SUCCESS.getHttpStatus()) | ||
.body(ApiResponse.success(DummyAppSuccess.GET_DUMMY_SUCCESS, DummyAppListResponse.of())); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/sopt/org/HMH/domain/dummy/DummyAppListResponse.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,17 @@ | ||
package sopt.org.HMH.domain.dummy; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Deprecated | ||
public record DummyAppListResponse( | ||
List<DummyApp> apps | ||
) { | ||
public static DummyAppListResponse of() { | ||
List<DummyApp> dummyAppList = new ArrayList<>(); | ||
dummyAppList.add(new DummyApp("Netflix","https://github.com/Team-HMH/HMH-Server/assets/69035864/dd068b83-641a-4bff-b4f5-381ea6e04d44")); | ||
dummyAppList.add(new DummyApp("Instagram","https://github.com/Team-HMH/HMH-Server/assets/69035864/bd572377-9dd9-47e7-a9f4-9efbbe66cd2e")); | ||
dummyAppList.add(new DummyApp("YouTube","https://github.com/Team-HMH/HMH-Server/assets/69035864/8afa60c0-bf1d-4ff0-9b50-4d1558a71f0a")); | ||
return new DummyAppListResponse(dummyAppList); | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/sopt/org/HMH/domain/dummy/DummyAppSuccess.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,31 @@ | ||
package sopt.org.HMH.domain.dummy; | ||
|
||
import lombok.AllArgsConstructor; | ||
import org.springframework.http.HttpStatus; | ||
import sopt.org.HMH.global.common.exception.base.SuccessBase; | ||
|
||
@AllArgsConstructor | ||
@Deprecated | ||
public enum DummyAppSuccess implements SuccessBase { | ||
|
||
GET_DUMMY_SUCCESS(HttpStatus.OK, "๋๋ฏธ ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ์ ์ฑ๊ณตํ์์ต๋๋ค."), | ||
; | ||
|
||
private final HttpStatus status; | ||
private final String successMessage; | ||
|
||
@Override | ||
public int getHttpStatusCode() { | ||
return this.status.value(); | ||
} | ||
|
||
@Override | ||
public HttpStatus getHttpStatus() { | ||
return this.status; | ||
} | ||
|
||
@Override | ||
public String getSuccessMessage() { | ||
return this.successMessage; | ||
} | ||
} |
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