minor fixes & refactoring

This commit is contained in:
Henry Jameson 2026-01-27 22:58:20 +02:00
commit ed9e9a3877
9 changed files with 286 additions and 294 deletions

View file

@ -1,4 +1,5 @@
import { defineStore } from 'pinia'
import { useInstanceStore } from 'src/stores/instance.js'
import {
@ -59,7 +60,6 @@ export const useOAuthStore = defineStore('oauth', {
this.userToken = false
},
async createApp() {
const { state } = window.vuex
const instance = useInstanceStore().server
const app = await createApp(instance)
this.setClientData(app)
@ -79,7 +79,6 @@ export const useOAuthStore = defineStore('oauth', {
}
},
async getAppToken() {
const { state } = window.vuex
const instance = useInstanceStore().server
const res = await getClientToken({
clientId: this.clientId,
@ -92,7 +91,6 @@ export const useOAuthStore = defineStore('oauth', {
/// 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)
async ensureAppToken() {
const { state } = window.vuex
if (this.appToken) {
try {
await verifyAppToken({