Skip to content

Commit 1495bb7

Browse files
authored
Merge pull request #35 from hawklike/dev
Dev 1.1.4
2 parents f33c733 + cbf1984 commit 1495bb7

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins {
66
}
77

88
group "cz.cvut.fit.steuejan"
9-
version "1.1.3"
9+
version "1.1.4"
1010
mainClassName = "io.ktor.server.netty.EngineMain"
1111

1212
repositories {

src/main/kotlin/cz/cvut/fit/steuejan/travel/api/trip/itinerary/model/ActivityItinerary.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import kotlinx.serialization.Serializable
99
class ActivityItinerary(
1010
val id: Int,
1111
val name: String,
12-
val activity: ActivityType?,
12+
val activity: ActivityType,
1313
override val duration: Duration,
1414
) : CommonItinerary(ItineraryType.ACTIVITY) {
1515
companion object {
1616
fun fromDto(dto: ActivityDto) = with(dto) {
17-
ActivityItinerary(id, name, type, duration)
17+
ActivityItinerary(id, name, type ?: ActivityType.OTHER, duration)
1818
}
1919
}
2020
}

src/main/kotlin/cz/cvut/fit/steuejan/travel/api/trip/poi/activity/response/ActivityResponse.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ data class ActivityResponse(
1313
override val tripId: Int,
1414
override val duration: Duration,
1515
override val name: String,
16-
val type: ActivityType?,
16+
val type: ActivityType,
1717
val address: Address,
1818
val coordinates: Coordinates,
1919
val mapLink: String?,

src/main/kotlin/cz/cvut/fit/steuejan/travel/data/database/activity/ActivityDto.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ data class ActivityDto(
5050
tripId = tripId,
5151
duration = duration,
5252
name = name,
53-
type = type,
53+
type = type ?: ActivityType.OTHER,
5454
address = address,
5555
coordinates = coordinates,
5656
mapLink = mapLink,

src/main/kotlin/cz/cvut/fit/steuejan/travel/data/model/ActivityType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cz.cvut.fit.steuejan.travel.data.model
22

33
@Suppress("unused") // used in DB
44
enum class ActivityType {
5-
HIKING, CYCLING, SKIING, RUNNING, KAYAK, SWIMMING, CLIMBING, CROSS_COUNTRY;
5+
HIKING, CYCLING, SKIING, RUNNING, KAYAK, SWIMMING, CLIMBING, CROSS_COUNTRY, OTHER;
66

77
companion object {
88
const val MAX_LENGTH = 13

0 commit comments

Comments
 (0)