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