Skip to content

Commit

Permalink
upate judgment conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong committed Nov 24, 2022
1 parent 334a749 commit 4b8196a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion route/api_route_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ func (r *APIRoute) SubscribeEvent(c echo.Context, sourceID codegen.SourceID, par
}
} else {
eventTypes, err := r.services.EventService.GetEventTypesBySourceID(sourceID)
if err != nil {
if err != nil || len(eventTypes) == 0 {
message := err.Error()
return c.JSON(http.StatusBadRequest, codegen.ResponseBadRequest{Message: &message})
}
Expand Down

0 comments on commit 4b8196a

Please sign in to comment.