Use latest version of function for watches

This commit is contained in:
Soam Vasani
2016-12-11 00:07:25 -08:00
parent 193cf594be
commit 0fb4cc1536
3 changed files with 8 additions and 9 deletions
+1 -7
View File
@@ -56,13 +56,7 @@ func (api *API) WatchApiCreate(w http.ResponseWriter, r *http.Request) {
return
}
function, err := api.FunctionStore.Get(&watch.Function)
if err != nil {
api.respondWithError(w, err)
return
}
watch.Url = fission.UrlForFunction(&function.Metadata)
watch.Url = fission.UrlForFunction(&watch.Function)
uid, err := api.WatchStore.Create(&watch)
if err != nil {