Skip to content

Commit 0c61d0b

Browse files
committed
fix: Wrong event URL is being shared (#1832)
1 parent 00425da commit 0c61d0b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ android {
3737
minifyEnabled true
3838
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
3939
buildConfigField "String", "DEFAULT_BASE_URL", '"https://api.eventyay.com/v1/"'
40+
buildConfigField "String", "FRONTEND_URL", '"https://eventyay.com/e/"'
4041
buildConfigField "String", "MAPBOX_KEY", '"'+MAPBOX_KEY+'"'
4142
buildConfigField "String", "STRIPE_API_KEY", '"'+STRIPE_API_TOKEN+'"'
4243
}
4344
debug {
4445
buildConfigField "String", "DEFAULT_BASE_URL", '"https://open-event-api-dev.herokuapp.com/v1/"'
46+
buildConfigField "String", "FRONTEND_URL", '"https://fossasia.github.io/open-event-frontend/e/"'
4547
buildConfigField "String", "MAPBOX_KEY", '"'+MAPBOX_KEY+'"'
4648
buildConfigField "String", "STRIPE_API_KEY", '"'+STRIPE_API_TOKEN+'"'
4749
}

app/src/main/java/org/fossasia/openevent/general/event/EventUtils.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ object EventUtils {
3333

3434
private val timeFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("hh:mm a")
3535
private val dateFormat: DateTimeFormatter = DateTimeFormatter.ofPattern("dd MMM yyyy")
36-
private const val frontendUrl = "https://open-event-frontend-dev.herokuapp.com/e/"
3736

3837
fun getSharableInfo(event: Event, resource: Resource = sharedResource): String {
3938
val description = event.description.nullToEmpty()
4039
val identifier = event.identifier
41-
val eventUrl = frontendUrl + identifier
40+
val eventUrl = BuildConfig.FRONTEND_URL + identifier
4241

4342
val message = StringBuilder()
4443

0 commit comments

Comments
 (0)