-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎨 remove NewOAuthAPI function, remove HTTPClient field's assignment #565
Conversation
グローバル変数じゃなくして
という点から全て |
|
infra/traq/group.go
Outdated
ctx := context.TODO() | ||
apiClient := NewOauth2APIClient(ctx, token) | ||
ctx := context.WithValue(context.TODO(), traq.ContextAccessToken, token.AccessToken) | ||
apiClient := traq.NewAPIClient(traqAPIConfig) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なるほどこれでいいのか
動くならこれでいい気もします
configはグローバルなものを使わずに毎回NewConfiguration()するのがよさそうです
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
返信遅くなりました 🙇
確認お願いします
手元環境で動かすとログインを試みたときに |
サーバーのアクセストークンを設定し忘れてたりしませんか? |
解決しました。サーバーのアクセストークンの設定のし忘れでした。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
見ました、よさそうですありがとうございます🙌
HTTPClient
フィールドを書き換える処理が原因で不具合が起きていることが確認できたのでHTTPClient
フィールドを書き換えないような処理に変更しました.