fix some tests
This commit is contained in:
parent
6066e80718
commit
f535a14dfc
4 changed files with 12 additions and 27 deletions
|
|
@ -69,7 +69,6 @@ export const paramsString = (params = {}) => {
|
|||
export const promisedRequest = async ({
|
||||
method,
|
||||
url,
|
||||
params,
|
||||
payload,
|
||||
formData,
|
||||
credentials,
|
||||
|
|
@ -88,17 +87,6 @@ export const promisedRequest = async ({
|
|||
options.headers['Content-Type'] = 'application/json'
|
||||
}
|
||||
|
||||
if (params) {
|
||||
url +=
|
||||
'?' +
|
||||
Object.entries(params)
|
||||
.map(
|
||||
([key, value]) =>
|
||||
encodeURIComponent(key) + '=' + encodeURIComponent(value),
|
||||
)
|
||||
.join('&')
|
||||
}
|
||||
|
||||
if (formData || payload) {
|
||||
options.body = formData || JSON.stringify(payload)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ export const useOAuthStore = defineStore('oauth', {
|
|||
instance,
|
||||
})
|
||||
this.setAppToken(res.data.access_token)
|
||||
return res.access_token
|
||||
return res.data.access_token
|
||||
},
|
||||
/// Use this if you want to ensure the app is still valid to use.
|
||||
/// @return {string} The access token to the app (not attached to any user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue