diff --git a/socketserver/server/commands.go b/socketserver/server/commands.go index ee373363..72fca25a 100644 --- a/socketserver/server/commands.go +++ b/socketserver/server/commands.go @@ -449,6 +449,13 @@ func bunchGetCacheStatus(br bunchedRequest, client *ClientInfo) (cacheStatus, ca return CacheStatusNotFound, emptyCachedBunchedResponse } +func normalizeBunchedRequest(br bunchedRequest) bunchedRequest { + if br.Command == "get_link" { + // TODO + } + return br +} + // C2SHandleBunchedCommand handles C2S Commands such as `get_link`. // It makes a request to the backend server for the data, but any other requests coming in while the first is pending also get the responses from the first one. // Additionally, results are cached. @@ -456,6 +463,7 @@ func C2SHandleBunchedCommand(conn *websocket.Conn, client *ClientInfo, msg Clien // FIXME(riking): Function is too complex br := bunchedRequestFromCM(&msg) + br = normalizeBunchedRequest(br) cacheStatus, cachedResponse := bunchGetCacheStatus(br, client)