-
Notifications
You must be signed in to change notification settings - Fork 17
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 #135 from dhis2/env_expected_function
fix: Fix native trigger environment
- Loading branch information
Showing
9 changed files
with
39 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package org.hisp.dhis.rules | ||
|
||
expect fun getEnvironment(): String | ||
import org.hisp.dhis.rules.models.TriggerEnvironment | ||
|
||
expect fun getEnvironment(): TriggerEnvironment |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package org.hisp.dhis.rules | ||
|
||
actual fun getEnvironment(): String { | ||
return "WEBCLIENT" | ||
import org.hisp.dhis.rules.models.TriggerEnvironment | ||
|
||
actual fun getEnvironment(): TriggerEnvironment { | ||
return TriggerEnvironment.WEBCLIENT | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package org.hisp.dhis.rules | ||
|
||
actual fun getEnvironment(): String { | ||
return "SERVER" | ||
import org.hisp.dhis.rules.models.TriggerEnvironment | ||
|
||
actual fun getEnvironment(): TriggerEnvironment { | ||
return TriggerEnvironment.SERVER | ||
} |
6 changes: 4 additions & 2 deletions
6
src/nativeMain/kotlin/org/hisp/dhis/rules/Environment.native.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,5 +1,7 @@ | ||
package org.hisp.dhis.rules | ||
|
||
actual fun getEnvironment(): String { | ||
return "ANDROIDCLIENT" | ||
import org.hisp.dhis.rules.models.TriggerEnvironment | ||
|
||
actual fun getEnvironment(): TriggerEnvironment { | ||
return TriggerEnvironment.NATIVE | ||
} |