Skip to content

Commit

Permalink
refactor: rewrite the error handle method with ueid already exists in…
Browse files Browse the repository at this point in the history
… subscriber create function
  • Loading branch information
Alonza0314 committed Nov 11, 2024
1 parent 466334d commit bae7045
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions backend/WebUI/api_webui.go
Original file line number Diff line number Diff line change
Expand Up @@ -1335,10 +1335,8 @@ func PostSubscriberByID(c *gin.Context) {
return
}
if len(authSubsDataInterface) > 0 {
if authSubsDataInterface["tenantId"].(string) != claims["tenantId"].(string) {
c.JSON(http.StatusUnprocessableEntity, gin.H{})
return
}
c.JSON(http.StatusConflict, gin.H{"cause": ueId + " already exists"})
return
}
}
dbOperation(ueId, servingPlmnId, "post", &subsData, claims)
Expand Down

0 comments on commit bae7045

Please sign in to comment.