Make the internal triggers point to the latest version

This commit is contained in:
Soam Vasani
2016-12-11 19:59:10 -08:00
parent f1e1da4ceb
commit b7906905c2
+4 -4
View File
@@ -67,15 +67,15 @@ func (ts *HTTPTriggerSet) getRouter() *mux.Router {
muxRouter.HandleFunc(trigger.UrlPattern, fh.handler) muxRouter.HandleFunc(trigger.UrlPattern, fh.handler)
} }
// Internal triggers for each function // Internal triggers for (the latest version of) each function
for _, function := range ts.functions { for _, function := range ts.functions {
m := fission.Metadata{Name: function.Metadata.Name}
fh := &functionHandler{ fh := &functionHandler{
fmap: ts.functionServiceMap, fmap: ts.functionServiceMap,
Function: fission.Metadata{Name: function.Metadata.Name}, Function: m,
poolmgr: ts.poolmgr, poolmgr: ts.poolmgr,
} }
muxRouter.HandleFunc(fission.UrlForFunction(&function.Metadata), muxRouter.HandleFunc(fission.UrlForFunction(&m), fh.handler)
fh.handler)
} }
return muxRouter return muxRouter