-
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.
Merge pull request #256 from mash-up-kr/feat/image_upload
[Feat] 밈 등록하기 기능
- Loading branch information
Showing
27 changed files
with
635 additions
and
143 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
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.