Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-cp committed Aug 23, 2023
1 parent 9199d25 commit ca46e83
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions publicapi/interaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -677,37 +677,11 @@ func (api InteractionAPI) AdmireToken(ctx context.Context, tokenID persist.DBID)
return "", err
}

/*
check later if admire already exists
admire, err := api.GetAdmireByActorIDAndTokenID(ctx, userID, postID)
if err == nil {
return "", persist.ErrAdmireAlreadyExists{AdmireID: admire.ID, ActorID: userID, TokenID: tokenID}
}
notFoundErr := persist.ErrAdmireNotFound{}
if !errors.As(err, &notFoundErr) {
return "", err
}
*/

admireID, err := api.repos.AdmireRepository.CreateTokenAdmire(ctx, tokenID, userID)
if err != nil {
return "", err
}

/*
skip dispatching this event for now
_, err = event.DispatchEvent(ctx, db.Event{
ActorID: persist.DBIDToNullStr(userID),
ResourceTypeID: persist.ResourceTypeAdmire,
SubjectID: tokenID,
TokenID: tokenID,
AdmireID: admireID,
Action: persist.ActionAdmiredToken,
}, api.validator, nil)
if err != nil {
return "", err
}
*/
return admireID, err
}

Expand Down

0 comments on commit ca46e83

Please sign in to comment.