fix revoking tokens
This commit is contained in:
parent
d449701b84
commit
bf86f03a0a
2 changed files with 3 additions and 1 deletions
|
|
@ -106,6 +106,8 @@ export const promisedRequest = async ({
|
||||||
.get('content-type')
|
.get('content-type')
|
||||||
.split(';')
|
.split(';')
|
||||||
.map((x) => x.toLowerCase().trim())
|
.map((x) => x.toLowerCase().trim())
|
||||||
|
const contentLength = parseInt(response.headers.get('content-length'))
|
||||||
|
if (contentLength === 0) return null
|
||||||
|
|
||||||
switch (contentType) {
|
switch (contentType) {
|
||||||
case 'text/plain':
|
case 'text/plain':
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ export const useOAuthTokensStore = defineStore('oauthTokens', {
|
||||||
fetchTokens() {
|
fetchTokens() {
|
||||||
fetchOAuthTokens({
|
fetchOAuthTokens({
|
||||||
credentials: useOAuthStore().token,
|
credentials: useOAuthStore().token,
|
||||||
}).then((tokens) => {
|
}).then(({ data: tokens }) => {
|
||||||
this.swapTokens(tokens)
|
this.swapTokens(tokens)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue