-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #194 from Genti2024/staging
- Loading branch information
Showing
16 changed files
with
187 additions
and
38 deletions.
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
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
27 changes: 27 additions & 0 deletions
27
genti-api/src/main/java/com/gt/genti/picturegenerateresponse/api/FrontendPGRESApi.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,27 @@ | ||
package com.gt.genti.picturegenerateresponse.api; | ||
|
||
import com.gt.genti.error.ResponseCode; | ||
import com.gt.genti.picture.PictureRatio; | ||
import com.gt.genti.response.GentiResponse; | ||
import com.gt.genti.swagger.AuthorizedUser; | ||
import com.gt.genti.swagger.EnumResponse; | ||
import com.gt.genti.swagger.EnumResponses; | ||
import com.gt.genti.user.model.AuthUser; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.constraints.NotNull; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
@AuthorizedUser | ||
@Tag(name = "[FrontendPGRESController] 프론트엔드 개발자가 직접 사진 생성 응답 처리하기", description = "개발 서버 한정입니다.") | ||
public interface FrontendPGRESApi { | ||
|
||
@Operation(summary = "사진 생성 응답 처리", description = "사진 생성 응답을 처리합니다.") | ||
@EnumResponses(value = { | ||
@EnumResponse(ResponseCode.OK) | ||
}) | ||
ResponseEntity<GentiResponse.ApiResult<Boolean>> finishPGRESByFrontend( | ||
@AuthUser Long userId); | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
...rc/main/java/com/gt/genti/picturegenerateresponse/controller/FrontendPGRESController.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 com.gt.genti.picturegenerateresponse.controller; | ||
|
||
import com.gt.genti.picture.PictureRatio; | ||
import com.gt.genti.picturegenerateresponse.service.PictureGenerateWorkService; | ||
import com.gt.genti.response.GentiResponse; | ||
import com.gt.genti.user.model.AuthUser; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.context.annotation.Profile; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Profile({"staging", "local"}) | ||
@RestController | ||
@RequestMapping("/api/v1/frontend/picture-generate-responses") | ||
@RequiredArgsConstructor | ||
public class FrontendPGRESController { | ||
|
||
private final PictureGenerateWorkService pictureGenerateWorkService; | ||
|
||
@PostMapping | ||
ResponseEntity<GentiResponse.ApiResult<Boolean>> finishPGRESByFrontend( | ||
@AuthUser Long userId | ||
){ | ||
return GentiResponse.success(pictureGenerateWorkService.finishPGRESByFrontend(userId)); | ||
} | ||
|
||
} |
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
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
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
23 changes: 23 additions & 0 deletions
23
...api/src/main/java/com/gt/genti/responseexample/dto/response/ExampleWithSquarePicture.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,23 @@ | ||
package com.gt.genti.responseexample.dto.response; | ||
|
||
import com.gt.genti.aws.AwsUtils; | ||
import com.gt.genti.picture.responseexample.model.ResponseExample; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Schema(name = "[ResponseExample][Admin&User] 사진 생성뷰1에서의 예시 사진 응답 dto") | ||
@Getter | ||
@NoArgsConstructor | ||
public class ExampleWithSquarePicture { | ||
@Schema(description = "해당 사진의 Url", example = "https://**") | ||
String url; | ||
|
||
@Schema(description = "에시 프롬프트", example = "벚꽃길에서 벤치에 앉아있어요") | ||
String prompt; | ||
|
||
public ExampleWithSquarePicture(ResponseExample responseExample) { | ||
this.url = AwsUtils.CLOUDFRONT_BASEURL + "/" + responseExample.getKey(); | ||
this.prompt = responseExample.getExamplePrompt(); | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
<pattern>${FILE_LOG_PATTERN}</pattern> | ||
<charset>utf8</charset> | ||
</encoder> | ||
</appender> | ||
</appender> |
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
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
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
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
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
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