add some stuff to backend base
This commit is contained in:
+1
-15
@@ -4,13 +4,7 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
interface RemoteEventHandler {
|
||||
suspend fun notify(eventInfo: RemoteEvent)
|
||||
|
||||
companion object {
|
||||
const val ON_EVENT = "$DYNAMIC_PREFIX/onEvent"
|
||||
}
|
||||
}
|
||||
const val ON_EVENT = "$DYNAMIC_PREFIX/onEvent"
|
||||
|
||||
interface RemoteEventListener {
|
||||
val event: Flow<RemoteEvent>
|
||||
@@ -45,11 +39,3 @@ sealed interface RemoteEvent {
|
||||
@SerialName("OnChatUpdate")
|
||||
data class OnChatUpdate(override val userId: Long) : RemoteEvent
|
||||
}
|
||||
|
||||
@Serializable
|
||||
@SerialName("AuthRequest")
|
||||
data class AuthRequest(val token: String)
|
||||
|
||||
@Serializable
|
||||
@SerialName("AuthResponse")
|
||||
data class AuthResponse(val ok: Boolean, val error: String? = null)
|
||||
|
||||
Reference in New Issue
Block a user