Skip to content

Commit

Permalink
feat: implement photo apis (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmkim20713 committed Jun 15, 2024
1 parent 8271765 commit 4f88d54
Showing 1 changed file with 50 additions and 0 deletions.
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();
}
}

0 comments on commit 4f88d54

Please sign in to comment.