-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] 밈 등록하기 기능 #256
Merged
Merged
[Feat] 밈 등록하기 기능 #256
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e6c5692
[Feat] 이미지 갤러리에서 불러오기 구현
EvergreenTree97 487914f
[Feat] 밈 등록 UI 일부 수정 및 state hoisting
EvergreenTree97 984eaeb
[Feat] 카테고리까지 구현
EvergreenTree97 f22d0d3
[Feat] 밈등록까지 성공
EvergreenTree97 0a1c967
[Feat] 예외처리
EvergreenTree97 f24f50a
[Chore] 패딩 수정 및 로그 제거
EvergreenTree97 e73d8b2
[Fix] 태그 하나일때도 업로드 가능하도록 수정
EvergreenTree97 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
31 changes: 31 additions & 0 deletions
31
core/domain/src/main/java/team/ppac/domain/usecase/UploadMemeUseCase.kt
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 team.ppac.domain.usecase | ||
|
||
import team.ppac.domain.repository.MemeRepository | ||
import javax.inject.Inject | ||
|
||
interface UploadMemeUseCase { | ||
suspend operator fun invoke( | ||
keywordIds: List<String>, | ||
memeImageUri: String, | ||
memeTitle: String, | ||
memeSource: String | ||
): Boolean | ||
} | ||
|
||
internal class UploadMemeUseCaseImpl @Inject constructor( | ||
private val memeRepository: MemeRepository | ||
) : UploadMemeUseCase { | ||
override suspend fun invoke( | ||
keywordIds: List<String>, | ||
memeImageUri: String, | ||
memeTitle: String, | ||
memeSource: String | ||
): Boolean { | ||
return memeRepository.uploadMeme( | ||
keywordIds = keywordIds, | ||
memeTitle = memeTitle, | ||
memeImageUri = memeImageUri, | ||
memeSource = memeSource | ||
) | ||
} | ||
} |
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
30 changes: 30 additions & 0 deletions
30
core/remote/src/main/kotlin/team/ppac/remote/model/response/meme/UploadMemeResponse.kt
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,30 @@ | ||
package team.ppac.remote.model.response.meme | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class UploadMemeResponse( | ||
@field:Json(name = "deviceId") | ||
val deviceId: String, | ||
@field:Json(name = "title") | ||
val title: String, | ||
@field:Json(name = "keywordIds") | ||
val keywords: List<String>?, | ||
@field:Json(name = "image") | ||
val image: String, | ||
@field:Json(name = "reaction") | ||
val reaction: Int, | ||
@field:Json(name = "source") | ||
val source: String, | ||
@field:Json(name = "isTodayMeme") | ||
val isTodayMeme: Boolean, | ||
@field:Json(name = "isDeleted") | ||
val isDeleted: Boolean, | ||
@field:Json(name = "_id") | ||
val id: String, | ||
@field:Json(name = "createdAt") | ||
val createdAt: String, | ||
@field:Json(name = "updatedAt") | ||
val updatedAt: String, | ||
) |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 했을 때 실제 fileName이랑 photopicker uri에서 fileName 얻어왔을 때랑 동일해??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
정상 업로드 된것을 봐서는 동일해