Spaces:
Runtime error
Runtime error
File size: 1,043 Bytes
2b43822 9369ecd 9dffdbf a18eb38 9dffdbf 2b43822 9dffdbf e1a2bcd 9dffdbf 9369ecd 2b43822 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import { HapticLinkServer } from "./hapticLinkServer";
import { GetUserInfoHandler, GetUserInfoSchema } from "./routes/get_user_info";
import { JoinRoomHandler, JoinRoomSchema } from "./routes/join_room";
import { LeaveRoomHandler, LeaveRoomSchema } from "./routes/leave_room";
import { SendVibrationHandler, SendVibrationSchema } from "./routes/send_touch";
import { SetUsernameHandler, SetUsernameSchema } from "./routes/set_username";
import { TestConnnectionSchema, TestConnectionHandler } from "./routes/test_connection";
export function registerRoutes(router: HapticLinkServer) {
router.addRoute("test_connection", TestConnnectionSchema, TestConnectionHandler);
router.addRoute("join_room", JoinRoomSchema, JoinRoomHandler);
router.addRoute("leave_room", LeaveRoomSchema, LeaveRoomHandler);
router.addRoute("send_touch", SendVibrationSchema, SendVibrationHandler);
router.addRoute("set_username", SetUsernameSchema, SetUsernameHandler);
router.addRoute("get_user_info", GetUserInfoSchema, GetUserInfoHandler);
}
|