return after error

This commit is contained in:
Andre Medeiros 2022-05-07 13:38:23 -04:00
parent eaf6a707ca
commit b001a51a30

View file

@ -77,6 +77,7 @@ func (a *api) createWatcherHandler(w http.ResponseWriter, r *http.Request) {
if len(accs) == 0 {
a.errorResponse(w, r, 422, "can't create watchers without accounts")
return
}
account := accs[0]