Skip to content

Commit

Permalink
fix retrieve pat method
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Jan 15, 2025
1 parent bcc7f6c commit 2dfcb74
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions auth/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,8 @@ func (svc service) UpdatePATDescription(ctx context.Context, token, patID, descr
return pat, nil
}

func (svc service) RetrievePAT(ctx context.Context, token, patID string) (PAT, error) {
key, err := svc.Identify(ctx, token)
if err != nil {
return PAT{}, err
}

pat, err := svc.pats.Retrieve(ctx, key.User, patID)
func (svc service) RetrievePAT(ctx context.Context, userID, patID string) (PAT, error) {
pat, err := svc.pats.Retrieve(ctx, userID, patID)
if err != nil {
return PAT{}, errors.Wrap(errRetrievePAT, err)
}
Expand Down

0 comments on commit 2dfcb74

Please sign in to comment.