use OAuthStore directly
This commit is contained in:
parent
529a2d100b
commit
3984a5aefa
44 changed files with 226 additions and 256 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { merge } from 'lodash'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
import { useCredentialsStore } from 'src/stores/credentials.js'
|
||||
import { useOAuthStore } from 'src/stores/oauth.js'
|
||||
|
||||
import { fetchPoll, vote } from 'src/services/api/api.service.js'
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ export const usePollsStore = defineStore('polls', {
|
|||
updateTrackedPoll(pollId) {
|
||||
fetchPoll({
|
||||
pollId,
|
||||
credentials: useCredentialsStore().current,
|
||||
credentials: useOAuthStore().token,
|
||||
}).then((poll) => {
|
||||
setTimeout(() => {
|
||||
if (this.trackedPolls[pollId]) {
|
||||
|
|
@ -58,7 +58,7 @@ export const usePollsStore = defineStore('polls', {
|
|||
return vote({
|
||||
pollId,
|
||||
choices,
|
||||
credentials: useCredentialsStore().current,
|
||||
credentials: useOAuthStore().token,
|
||||
}).then((poll) => {
|
||||
this.mergeOrAddPoll(poll)
|
||||
return poll
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue