Skip to content

Commit

Permalink
fix: lint again
Browse files Browse the repository at this point in the history
  • Loading branch information
Alonza0314 committed Dec 12, 2024
1 parent 05061a4 commit 0c0dd1a
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions backend/WebUI/api_webui.go
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,15 @@ func sendRechargeNotification(ueId string, rg int32) {
}
}

func dbOperation(ueId string, servingPlmnId string, method string, subsData *SubsData, subsDatas []*SubsListIE, claims jwt.MapClaims, multiple bool) {
func dbOperation(
ueId string,
servingPlmnId string,
method string,
subsData *SubsData,
subsDatas []*SubsListIE,
claims jwt.MapClaims,
multiple bool,
) {
filterUeIdOnly := bson.M{"ueId": ueId}
filter := bson.M{"ueId": ueId, "servingPlmnId": servingPlmnId}

Expand Down Expand Up @@ -1432,7 +1440,11 @@ func dbOperation(ueId string, servingPlmnId string, method string, subsData *Sub
})
}

multipleFliterUeIdOnly, multipleFliter := bson.M{"$or": multipleFilterUeIdOnlyConditions}, bson.M{"$or": multipleFliterConditions}
multipleFliterUeIdOnly, multipleFliter := bson.M{
"$or": multipleFilterUeIdOnlyConditions,
}, bson.M{
"$or": multipleFliterConditions,
}

if err := mongoapi.RestfulAPIDeleteMany(authSubsDataColl, multipleFliterUeIdOnly); err != nil {
logger.ProcLog.Errorf("DeleteMultipleSubscribers err: %+v", err)
Expand Down Expand Up @@ -2055,7 +2067,10 @@ func DeleteMultipleProfiles(c *gin.Context) {
return
}

dbProfileOperation("", "delete", nil, profileDatas, true)
if err := dbProfileOperation("", "delete", nil, profileDatas, true); err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"cause": err.Error()})
return
}

c.JSON(http.StatusNoContent, gin.H{})
}
Expand Down Expand Up @@ -2198,7 +2213,13 @@ func PutProfile(c *gin.Context) {
c.JSON(http.StatusOK, profile)
}

func dbProfileOperation(profileName string, method string, profile *Profile, profileDatas []*Profile, multiple bool) (err error) {
func dbProfileOperation(
profileName string,
method string,
profile *Profile,
profileDatas []*Profile,
multiple bool,
) (err error) {
err = nil
filter := bson.M{"profileName": profileName}

Expand Down

0 comments on commit 0c0dd1a

Please sign in to comment.