-
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
8271765
commit 4f88d54
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
photo-service/src/main/java/kr/mafoo/photo/controller/PhotoController.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,50 @@ | ||
package kr.mafoo.photo.controller; | ||
|
||
import kr.mafoo.photo.api.PhotoApi; | ||
import kr.mafoo.photo.controller.dto.request.PhotoCreateRequest; | ||
import kr.mafoo.photo.controller.dto.request.PhotoAlbumUpdateRequest; | ||
import kr.mafoo.photo.controller.dto.response.PhotoResponse; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import reactor.core.publisher.Flux; | ||
import reactor.core.publisher.Mono; | ||
|
||
@RestController | ||
public class PhotoController implements PhotoApi { | ||
|
||
@Override | ||
public Flux<PhotoResponse> getAlbumPhotos( | ||
String albumId | ||
){ | ||
return Flux.just( | ||
new PhotoResponse("test_photo_id_a", "test_album_id_a", "photo_url"), | ||
new PhotoResponse("test_photo_id_b", "test_album_id_a", "photo_url"), | ||
new PhotoResponse("test_photo_id_c", "test_album_id_a", "photo_url") | ||
); | ||
} | ||
|
||
@Override | ||
public Mono<PhotoResponse> createPhoto( | ||
PhotoCreateRequest request | ||
){ | ||
return Mono.just( | ||
new PhotoResponse("test_photo_id", "photo_url", null) | ||
); | ||
} | ||
|
||
@Override | ||
public Mono<PhotoResponse> updatePhotoAlbum( | ||
String photoId, | ||
PhotoAlbumUpdateRequest request | ||
){ | ||
return Mono.just( | ||
new PhotoResponse("test_photo_id", "photo_url", "test_album_id") | ||
); | ||
} | ||
|
||
@Override | ||
public Mono<Void> deletePhoto( | ||
String photoId | ||
){ | ||
return Mono.empty(); | ||
} | ||
} |