-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58d0ea4
commit f46c14d
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
photo-service/src/main/java/kr/mafoo/photo/controller/AlbumController.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,55 @@ | ||
package kr.mafoo.photo.controller; | ||
|
||
import kr.mafoo.photo.api.AlbumApi; | ||
import kr.mafoo.photo.controller.dto.request.AlbumCreateRequest; | ||
import kr.mafoo.photo.controller.dto.request.AlbumUpdateRequest; | ||
import kr.mafoo.photo.controller.dto.response.AlbumResponse; | ||
import org.springframework.web.bind.annotation.*; | ||
import reactor.core.publisher.Flux; | ||
import reactor.core.publisher.Mono; | ||
|
||
import static kr.mafoo.photo.domain.AlbumType.*; | ||
|
||
@RestController | ||
public class AlbumController implements AlbumApi { | ||
|
||
@Override | ||
public Flux<AlbumResponse> getAlbums( | ||
) { | ||
return Flux.just( | ||
new AlbumResponse("test_album_id_a", "๋จ์ง์ด๋", TYPE_A, "1"), | ||
new AlbumResponse("test_album_id_b", "์ผ๋ฟ๋ค", TYPE_B, "5"), | ||
new AlbumResponse("test_album_id_c", "๋๊ตฌํ", TYPE_C, "2"), | ||
new AlbumResponse("test_album_id_d", "ํ์ฌ์ฌ๋๋ค", TYPE_D, "12"), | ||
new AlbumResponse("test_album_id_e", "๊ธฐ๋ ์ผ", TYPE_E, "4"), | ||
new AlbumResponse("test_album_id_f", "์น๊ตฌ๋ค์ด๋", TYPE_F, "9") | ||
); | ||
} | ||
|
||
@Override | ||
public Mono<AlbumResponse> createAlbum( | ||
AlbumCreateRequest request | ||
){ | ||
return Mono.just( | ||
new AlbumResponse("test_album_id", "์๊ธ์นํ์ทํ", TYPE_A, "0") | ||
); | ||
} | ||
|
||
@Override | ||
public Mono<AlbumResponse> updateAlbum( | ||
String albumId, | ||
AlbumUpdateRequest request | ||
){ | ||
return Mono.just( | ||
new AlbumResponse("test_album_id", "์๊ธ์นํ์ทํ", TYPE_A, "0") | ||
); | ||
} | ||
|
||
@Override | ||
public Mono<Void> deleteAlbum( | ||
String albumId | ||
){ | ||
return Mono.empty(); | ||
} | ||
|
||
} |