join group

This commit is contained in:
withchao
2022-12-28 17:56:13 +08:00
parent 29adb5de07
commit 1e2a60c802
2 changed files with 8 additions and 3 deletions
@@ -27,7 +27,9 @@ func UpdateGroupRequest(groupRequest db.GroupRequest) error {
}
func InsertIntoGroupRequest(toInsertInfo db.GroupRequest) error {
DelGroupRequestByGroupIDAndUserID(toInsertInfo.GroupID, toInsertInfo.UserID)
if err := DelGroupRequestByGroupIDAndUserID(toInsertInfo.GroupID, toInsertInfo.UserID); err != nil {
return err
}
if toInsertInfo.HandledTime.Unix() < 0 {
toInsertInfo.HandledTime = utils.UnixSecondToTime(0)
}
@@ -70,7 +72,7 @@ func GetGroupRequestByGroupID(groupID string) ([]db.GroupRequest, error) {
return groupRequestList, nil
}
//received
// received
func GetGroupApplicationList(userID string) ([]db.GroupRequest, error) {
var groupRequestList []db.GroupRequest
memberList, err := GetGroupMemberListByUserID(userID)