Created
January 9, 2024 13:55
-
-
Save ayitinya/f93868ae6f5c0b3fa03bebf7907326c7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// project-root | |
plugins { | |
// this is necessary to avoid the plugins to be loaded multiple times | |
// in each subproject's classloader | |
alias(libs.plugins.kotlinJvm) apply false | |
alias(libs.plugins.jetbrainsCompose) apply false | |
alias(libs.plugins.androidApplication) apply false | |
alias(libs.plugins.androidLibrary) apply false | |
alias(libs.plugins.kotlinMultiplatform) apply false | |
alias(libs.plugins.kotlinPluginSerialization) apply false | |
} |
This file contains hidden or 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
// shared/commonMain/kotlin/package/resource/UserResources.kt | |
import io.ktor.resources.* | |
import kotlinx.serialization.Serializable | |
@Serializable | |
@Resource("/users") | |
class UsersResource { | |
@Serializable | |
@Resource("/me") | |
data class SessionUserDetails(val parent: UsersResource = UsersResource()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment