Refactor code

pull/131/head
wenxu12345 3 years ago
parent f59208b9cf
commit c0172b0a49

@ -26,6 +26,8 @@ func UpdateGroupRequest(groupRequest GroupRequest) error {
//RowsAffected //RowsAffected
if dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).RowsAffected == 0 { if dbConn.Table("group_request").Where("group_id=? and user_id=?", groupRequest.GroupID, groupRequest.UserID).Update(&groupRequest).RowsAffected == 0 {
return InsertIntoGroupRequest(groupRequest) return InsertIntoGroupRequest(groupRequest)
} else {
return nil
} }
} }

Loading…
Cancel
Save