Add missing return after http abort
This commit is contained in:
parent
eba9adb13e
commit
b64d821480
|
@ -160,6 +160,7 @@ func patchZoneService(c *gin.Context) {
|
|||
err = zone.EraseService(usc.Domain, domain.DomainName, usc.Id, usc)
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"errmsg": err.Error()})
|
||||
return
|
||||
}
|
||||
|
||||
ApiResponse(c, zone.Services, storage.MainStore.UpdateZone(zone))
|
||||
|
|
|
@ -93,6 +93,7 @@ func getProviderSpecIcon(c *gin.Context) {
|
|||
cnt, ok := providers.Icons[strings.TrimSuffix(psid, ".png")]
|
||||
if !ok {
|
||||
c.AbortWithStatusJSON(http.StatusNotFound, gin.H{"errmsg": "Icon not found."})
|
||||
return
|
||||
}
|
||||
|
||||
c.Data(http.StatusOK, "image/png", cnt)
|
||||
|
|
Loading…
Reference in New Issue