-
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 #164 from PawWithU/feature/create_announcement
feature/create_announcement: 공고 등록 api 연결
- Loading branch information
Showing
104 changed files
with
254 additions
and
35 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
17 changes: 17 additions & 0 deletions
17
...ain/java/com/kusitms/connectdog/core/data/api/model/intermediator/CreateApplicationDto.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,17 @@ | ||
package com.kusitms.connectdog.core.data.api.model.intermediator | ||
|
||
import com.squareup.moshi.JsonClass | ||
|
||
@JsonClass(generateAdapter = true) | ||
data class CreateApplicationDto( | ||
val departureLoc: String, | ||
val arrivalLoc: String, | ||
val startDate: String, | ||
val endDate: String, | ||
val pickUpTime: String, | ||
val isKennel: Boolean, | ||
val content: String, | ||
val dogName: String, | ||
val dogSize: String, | ||
val specifics: 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
7 changes: 6 additions & 1 deletion
7
core/data/src/main/java/com/kusitms/connectdog/core/data/repository/InterHomeRepository.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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
package com.kusitms.connectdog.core.data.repository | ||
|
||
interface InterHomeRepository | ||
import com.kusitms.connectdog.core.data.api.model.intermediator.CreateApplicationDto | ||
import java.io.File | ||
|
||
interface InterHomeRepository { | ||
suspend fun createApplication(body: CreateApplicationDto, images: List<File>) | ||
} |
27 changes: 26 additions & 1 deletion
27
...data/src/main/java/com/kusitms/connectdog/core/data/repository/InterHomeRepositoryImpl.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 |
---|---|---|
@@ -1,3 +1,28 @@ | ||
package com.kusitms.connectdog.core.data.repository | ||
|
||
class InterHomeRepositoryImpl | ||
import com.google.gson.Gson | ||
import com.kusitms.connectdog.core.data.api.InterApiService | ||
import com.kusitms.connectdog.core.data.api.model.intermediator.CreateApplicationDto | ||
import okhttp3.MediaType.Companion.toMediaTypeOrNull | ||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import java.io.File | ||
import javax.inject.Inject | ||
|
||
internal class InterHomeRepositoryImpl @Inject constructor( | ||
private val api: InterApiService | ||
) : InterHomeRepository { | ||
override suspend fun createApplication(body: CreateApplicationDto, images: List<File>) { | ||
val jsonBody = RequestBody.create( | ||
"application/json; charset=utf-8".toMediaTypeOrNull(), | ||
Gson().toJson(body) | ||
) | ||
|
||
val files = images.map { file -> | ||
val fileBody = RequestBody.create("multipart/form-data".toMediaTypeOrNull(), file) | ||
MultipartBody.Part.createFormData("files", file.name, fileBody) | ||
} | ||
|
||
api.postApplication(jsonBody, files) | ||
} | ||
} |
Binary file modified
BIN
+0 Bytes
(100%)
...system/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/inputs/source-to-output.tab
Binary file not shown.
Binary file modified
BIN
+3.23 KB
(120%)
...ld/kotlin/compileReleaseKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...d/kotlin/compileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab
Binary file not shown.
Binary file modified
BIN
+2.19 KB
(160%)
...ompileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab
Binary file not shown.
Binary file modified
BIN
+3 Bytes
(100%)
...d/kotlin/compileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
.../designsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab
Binary file not shown.
Binary file modified
BIN
+2.53 KB
(230%)
...tem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...m/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab
Binary file not shown.
Binary file modified
BIN
+1.75 KB
(110%)
...tlin/compileReleaseKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
.../designsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/counters.tab
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
28 | ||
29 | ||
0 |
Binary file modified
BIN
+0 Bytes
(100%)
...esignsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/file-to-id.tab
Binary file not shown.
Binary file modified
BIN
+6 Bytes
(100%)
...m/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...esignsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/id-to-file.tab
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...m/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ild/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...nsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len
Binary file not shown.
Binary file modified
BIN
+112 Bytes
(100%)
...m/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ignsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
core/designsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...stem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
.../build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...signsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.len
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...nsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.values
Binary file not shown.
Binary file modified
BIN
+2.47 KB
(270%)
...stem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...designsystem/build/kotlin/compileReleaseKotlin/cacheable/caches-jvm/lookups/lookups.tab_i
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
core/designsystem/build/kotlin/compileReleaseKotlin/cacheable/last-build.bin
Binary file not shown.
Binary file modified
BIN
+34 Bytes
(210%)
core/designsystem/build/kotlin/compileReleaseKotlin/local-state/build-history.bin
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...m/kusitms/connectdog/core/designsystem/component/ApplicationBottomSheetKt$Content$1.class
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
...release/com/kusitms/connectdog/core/designsystem/component/ApplicationBottomSheetKt.class
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
.../kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/BannerKt.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...usitms/connectdog/core/designsystem/component/BottomSheetKt$ConnectDogBottomSheet$1.class
Binary file not shown.
Binary file modified
BIN
+61 Bytes
(100%)
...in-classes/release/com/kusitms/connectdog/core/designsystem/component/BottomSheetKt.class
Binary file not shown.
Binary file removed
BIN
-3.61 KB
...om/kusitms/connectdog/core/designsystem/component/ButtonKt$ConnectDogFilledButton$1.class
Binary file not shown.
Binary file removed
BIN
-2.48 KB
...om/kusitms/connectdog/core/designsystem/component/ButtonKt$ConnectDogFilledButton$2.class
Binary file not shown.
Binary file removed
BIN
-1.55 KB
.../release/com/kusitms/connectdog/core/designsystem/component/ButtonKt$FilledButton$1.class
Binary file not shown.
Binary file modified
BIN
+44 Bytes
(100%)
.../kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/ButtonKt.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...designsystem/component/CalendarKt$CalendarMonth$1$1$invoke$$inlined$items$default$1.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...designsystem/component/CalendarKt$CalendarMonth$1$1$invoke$$inlined$items$default$2.class
Binary file not shown.
Binary file modified
BIN
-121 Bytes
(96%)
...designsystem/component/CalendarKt$CalendarMonth$1$1$invoke$$inlined$items$default$3.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...designsystem/component/CalendarKt$CalendarMonth$1$1$invoke$$inlined$items$default$4.class
Binary file not shown.
Binary file modified
BIN
-43 Bytes
(100%)
...designsystem/component/CalendarKt$CalendarMonth$1$1$invoke$$inlined$items$default$5.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ase/com/kusitms/connectdog/core/designsystem/component/CalendarKt$CalendarMonth$1$1.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...om/kusitms/connectdog/core/designsystem/component/CalendarKt$ConnectDogCalendar$3$3.class
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
...otlin-classes/release/com/kusitms/connectdog/core/designsystem/component/CalendarKt.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ase/com/kusitms/connectdog/core/designsystem/component/CardKt$ConnectDogErrorCard$1.class
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
...mp/kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/CardKt.class
Binary file not shown.
Binary file removed
BIN
-1.16 KB
...s/connectdog/core/designsystem/component/ComposableSingletons$ButtonKt$lambda-4$1$1.class
Binary file not shown.
Binary file removed
BIN
-2.76 KB
...tms/connectdog/core/designsystem/component/ComposableSingletons$ButtonKt$lambda-4$1.class
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
...ms/connectdog/core/designsystem/component/ComposableSingletons$ContentKt$lambda-1$1.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/ContentKt.class
Binary file not shown.
Binary file modified
BIN
+6 Bytes
(100%)
...com/kusitms/connectdog/core/designsystem/component/DialogKt$ConnectDogAlertDialog$4.class
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
.../kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/DialogKt.class
Binary file not shown.
Binary file modified
BIN
+6 Bytes
(100%)
...ses/release/com/kusitms/connectdog/core/designsystem/component/InformationContentKt.class
Binary file not shown.
Binary file modified
BIN
+6 Bytes
(100%)
.../release/com/kusitms/connectdog/core/designsystem/component/KennelKt$KennelButton$2.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
.../kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/KennelKt.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...se/com/kusitms/connectdog/core/designsystem/component/ListItemKt$AnnouncementItem$1.class
Binary file not shown.
Binary file modified
BIN
+10 Bytes
(100%)
...otlin-classes/release/com/kusitms/connectdog/core/designsystem/component/ListItemKt.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...e/com/kusitms/connectdog/core/designsystem/component/LocationKt$RegionBottomSheet$1.class
Binary file not shown.
Binary file modified
BIN
+65 Bytes
(100%)
...otlin-classes/release/com/kusitms/connectdog/core/designsystem/component/LocationKt.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...n-classes/release/com/kusitms/connectdog/core/designsystem/component/NetworkImageKt.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...g/core/designsystem/component/RegionsKt$GuGunList$1$invoke$$inlined$items$default$1.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...g/core/designsystem/component/RegionsKt$GuGunList$1$invoke$$inlined$items$default$2.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...g/core/designsystem/component/RegionsKt$GuGunList$1$invoke$$inlined$items$default$3.class
Binary file not shown.
Binary file modified
BIN
-85 Bytes
(99%)
...g/core/designsystem/component/RegionsKt$GuGunList$1$invoke$$inlined$items$default$4.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...es/release/com/kusitms/connectdog/core/designsystem/component/RegionsKt$GuGunList$1.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ore/designsystem/component/RegionsKt$SiDoList$1$1$1$invoke$$inlined$items$default$1.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ore/designsystem/component/RegionsKt$SiDoList$1$1$1$invoke$$inlined$items$default$2.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ore/designsystem/component/RegionsKt$SiDoList$1$1$1$invoke$$inlined$items$default$3.class
Binary file not shown.
Binary file modified
BIN
-85 Bytes
(99%)
...ore/designsystem/component/RegionsKt$SiDoList$1$1$1$invoke$$inlined$items$default$4.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...release/com/kusitms/connectdog/core/designsystem/component/RegionsKt$SiDoList$1$1$1.class
Binary file not shown.
Binary file modified
BIN
+10 Bytes
(100%)
...kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/RegionsKt.class
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
.../core/designsystem/component/ReviewRecentContentKt$ConnectDogCommunityContent$1$1$1.class
Binary file not shown.
Binary file modified
BIN
+10 Bytes
(100%)
...es/release/com/kusitms/connectdog/core/designsystem/component/ReviewRecentContentKt.class
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
...s/release/com/kusitms/connectdog/core/designsystem/component/SizeKt$DogSizeButton$2.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...mp/kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/SizeKt.class
Binary file not shown.
Binary file modified
BIN
+6 Bytes
(100%)
...tmp/kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/TagKt.class
Binary file not shown.
Binary file modified
BIN
-166 Bytes
(96%)
...usitms/connectdog/core/designsystem/component/TextFieldKt$ConnectDogIconTextField$3.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...usitms/connectdog/core/designsystem/component/TextFieldKt$ConnectDogIconTextField$4.class
Binary file not shown.
Binary file modified
BIN
-4 Bytes
(100%)
.../kusitms/connectdog/core/designsystem/component/TextFieldKt$ConnectDogTextField$1$2.class
Binary file not shown.
Binary file modified
BIN
-4 Bytes
(100%)
.../kusitms/connectdog/core/designsystem/component/TextFieldKt$ConnectDogTextField$1$3.class
Binary file not shown.
Binary file modified
BIN
+359 Bytes
(100%)
...tlin-classes/release/com/kusitms/connectdog/core/designsystem/component/TextFieldKt.class
Binary file not shown.
Binary file modified
BIN
-166 Bytes
(99%)
...om/kusitms/connectdog/core/designsystem/component/TimeWheelPickerKt$DayTimePicker$2.class
Binary file not shown.
Binary file modified
BIN
-166 Bytes
(99%)
...itms/connectdog/core/designsystem/component/TimeWheelPickerKt$LoopingNumberPicker$2.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...lasses/release/com/kusitms/connectdog/core/designsystem/component/TimeWheelPickerKt.class
Binary file not shown.
Binary file modified
BIN
+16 Bytes
(100%)
...tlin-classes/release/com/kusitms/connectdog/core/designsystem/component/TopAppBarKt.class
Binary file not shown.
Binary file modified
BIN
+4 Bytes
(100%)
...kotlin-classes/release/com/kusitms/connectdog/core/designsystem/component/UiStateKt.class
Binary file not shown.
Binary file modified
BIN
+17 Bytes
(100%)
...d/tmp/kotlin-classes/release/com/kusitms/connectdog/core/designsystem/theme/ThemeKt.class
Binary file not shown.
Binary file modified
BIN
-166 Bytes
(97%)
...ld/tmp/kotlin-classes/release/com/kusitms/connectdog/core/designsystem/theme/TypeKt.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...kusitms/connectdog/core/designsystem/component/bottomSheet/InterApplicationBottomSheet.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 @@ | ||
package com.kusitms.connectdog.core.designsystem.component.bottomSheet |
Binary file modified
BIN
+0 Bytes
(100%)
core/model/build/kotlin/compileReleaseKotlin/cacheable/last-build.bin
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
core/model/build/kotlin/compileReleaseKotlin/local-state/build-history.bin
Binary file not shown.
23 changes: 23 additions & 0 deletions
23
core/util/src/main/java/com/kusitms/connectdog/core/util/ImageConverter.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,23 @@ | ||
package com.kusitms.connectdog.core.util | ||
|
||
import android.content.Context | ||
import android.graphics.Bitmap | ||
import android.graphics.BitmapFactory | ||
import android.net.Uri | ||
import java.io.File | ||
import java.io.FileOutputStream | ||
|
||
object ImageConverter { | ||
fun uriToFile(context: Context, uri: Uri, quality: Int): File? { | ||
val inputStream = context.contentResolver.openInputStream(uri) | ||
val bitmap = BitmapFactory.decodeStream(inputStream) | ||
val tempFile = File.createTempFile("compressed_", ".jpg", context.cacheDir) | ||
val outputStream = FileOutputStream(tempFile) | ||
|
||
bitmap.compress(Bitmap.CompressFormat.JPEG, quality, outputStream) | ||
outputStream.flush() | ||
outputStream.close() | ||
|
||
return tempFile | ||
} | ||
} |
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.