diff --git a/photo-service/src/main/java/kr/mafoo/photo/controller/PhotoController.java b/photo-service/src/main/java/kr/mafoo/photo/controller/PhotoController.java new file mode 100644 index 0000000..735052b --- /dev/null +++ b/photo-service/src/main/java/kr/mafoo/photo/controller/PhotoController.java @@ -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 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 createPhoto( + PhotoCreateRequest request + ){ + return Mono.just( + new PhotoResponse("test_photo_id", "photo_url", null) + ); + } + + @Override + public Mono updatePhotoAlbum( + String photoId, + PhotoAlbumUpdateRequest request + ){ + return Mono.just( + new PhotoResponse("test_photo_id", "photo_url", "test_album_id") + ); + } + + @Override + public Mono deletePhoto( + String photoId + ){ + return Mono.empty(); + } +}