Skip to content

Commit

Permalink
Merge pull request #20 from andy89923/refactor/oauth-type
Browse files Browse the repository at this point in the history
Fix: change parameter type of OAuth functions
  • Loading branch information
ianchen0119 committed Jan 17, 2024
2 parents eac6ed4 + 485c628 commit 52ad992
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions oauth/get_token_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ var tokenMap sync.Map
var clientMap sync.Map

func GetTokenCtx(
nfType models.NfType,
nfId, nrfUri, scope, targetNF string,
nfType, targetNF models.NfType,
nfId, nrfUri, scope string,
) (context.Context, *models.ProblemDetails, error) {
tok, pd, err := sendAccTokenReq(nfType, nfId, nrfUri, scope, targetNF)
tok, pd, err := sendAccTokenReq(nfType, targetNF, nfId, nrfUri, scope)
if err != nil {
return nil, pd, err
}
Expand All @@ -29,8 +29,8 @@ func GetTokenCtx(
}

func sendAccTokenReq(
nfType models.NfType,
nfId, nrfUri, scope, targetNF string,
nfType, targetNF models.NfType,
nfId, nrfUri, scope string,
) (oauth2.TokenSource, *models.ProblemDetails, error) {
var client *Nnrf_AccessToken.APIClient

Expand Down

0 comments on commit 52ad992

Please sign in to comment.