2020-03-31 12:42:53 +00:00
|
|
|
/**
|
|
|
|
* User Websocket requests route
|
|
|
|
*
|
|
|
|
* Note : this implementation requires the
|
|
|
|
* user to be signed in to perform requests
|
|
|
|
*
|
|
|
|
* @author Pierre Hubert
|
|
|
|
*/
|
|
|
|
|
|
|
|
import { UserWebSocketRequestsHandler } from "../entities/WebSocketRequestHandler";
|
2020-03-31 14:42:35 +00:00
|
|
|
import { LikesController } from "./LikesController";
|
2020-03-31 12:42:53 +00:00
|
|
|
|
|
|
|
export interface UserWebSocketRoute {
|
|
|
|
title: string,
|
|
|
|
handler: (h: UserWebSocketRequestsHandler) => Promise<void>
|
|
|
|
}
|
|
|
|
|
2020-03-31 14:42:35 +00:00
|
|
|
export const UserWebSocketRoutes: UserWebSocketRoute[] = [
|
|
|
|
|
|
|
|
// Likes controller
|
|
|
|
{title: "likes/update", handler: (h) => LikesController.Update(h)},
|
|
|
|
|
|
|
|
|
|
|
|
]
|