override suspend fun loadAppInstance()

in kotlin/space-events/src/main/kotlin/org/webhooks/AppInstanceStorage.kt [15:27]


    override suspend fun loadAppInstance(clientId: String): SpaceAppInstance? {
        return transaction {
            AppInstallation.select { AppInstallation.clientId.eq(clientId) }
                .map {
                    SpaceAppInstance(
                        it[AppInstallation.clientId],
                        it[AppInstallation.clientSecret],
                        it[AppInstallation.serverUrl],
                    )
                }
                .firstOrNull()
        }
    }