mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-23 07:32:28 -04:00
wip
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import Elysia, { t } from "elysia";
|
||||
|
||||
const actionMap: Record<string, ][> = [
|
||||
|
||||
]
|
||||
|
||||
export const appWs = new Elysia().ws("/ws", {
|
||||
body: t.Union([
|
||||
t.Object({
|
||||
action: t.Literal("ping"),
|
||||
}),
|
||||
t.Object({
|
||||
action: t.Literal("watch"),
|
||||
entry: t.String(),
|
||||
}),
|
||||
]),
|
||||
message(ws, { message }) {
|
||||
actionMap[message.action](message);
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user