Implement Websocket for push Notification

create auth with jwt in query string
This commit is contained in:
2020-02-27 01:38:34 +01:00
parent b678f7f2cc
commit 1418dd95bc
5 changed files with 113 additions and 11 deletions

View File

@@ -9,15 +9,16 @@ import io.ktor.util.KtorExperimentalAPI
import kotlinx.coroutines.DisposableHandle
import org.joda.time.DateTime
abstract class Notification(
open class Notification(
val type: String,
val createdAt: DateTime = DateTime.now()
)
) : Serializable
open class EntityEvent(
val target: UuidEntity,
type: String,
val action: String
) : Notification(type), Serializable {
) : Notification(type) {
enum class Type(val event: EventDefinition<ArticleUpdate>) {
UPDATE_ARTICLE(EventDefinition<ArticleUpdate>())
}