Fix bug in populating watch url

This commit is contained in:
Soam Vasani
2016-12-10 19:53:13 -08:00
parent 9dcd2b711f
commit 188280488c
+8 -1
View File
@@ -55,7 +55,14 @@ func (api *API) WatchApiCreate(w http.ResponseWriter, r *http.Request) {
api.respondWithError(w, err)
return
}
watch.Url = fission.UrlForFunction(&watch.Function)
function, err := api.FunctionStore.Get(&watch.Function)
if err != nil {
api.respondWithError(w, err)
return
}
watch.Url = fission.UrlForFunction(&function.Metadata)
uid, err := api.WatchStore.Create(&watch)
if err != nil {