Skip to content
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

Networkの:params:についてのバグ #56

Closed
cutls opened this issue May 24, 2020 · 2 comments
Closed

Networkの:params:についてのバグ #56

cutls opened this issue May 24, 2020 · 2 comments

Comments

@cutls
Copy link

cutls commented May 24, 2020

https://github.com/potproject/ikuradon/blob/master/app/services/Networking.js#L9

このapi.urlを一回変数に入れてからいじらないと、2回目以降に:param:がreplaceされたやつをreplaceしようとしてしまって別のURLをたたいてしまう気がする

//(1回目) app.url = /api/v1/SOMEAPI/:params: → (2回目) app.url = /api/v1/SOMEAPI/REPLACED
api.url = restParams !== null ? api.url.replace(":param:", restParams) : api.url;
//app.url = /api/v1/SOMEAPI/REPLACED←これを保持してしまう(2回目以降置換するものがなくなる
                let response = await axios({
                    url: baseurl + api.url,
                    method: api.method,
                    headers: this.createHeaders(access_token),
                    params: Object.assign(api.form, postParams)
                });
@potproject
Copy link
Owner

あっ本当だ・・・

これだとお気に入りとかブーストが2回目以降全然反応しませんね・・・
テスト不足を思い知らされる・・・バグ報告めちゃくちゃありがたい

@potproject
Copy link
Owner

beta6にて修正済み。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants