fix some tests

This commit is contained in:
Henry Jameson 2026-06-17 21:05:54 +03:00
commit f535a14dfc
4 changed files with 12 additions and 27 deletions

View file

@ -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)
}

View file

@ -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)