Fix type errors

This commit is contained in:
2025-07-17 20:47:03 +02:00
parent 1362d0a289
commit 1156bc315e
43 changed files with 372 additions and 323 deletions

View File

@ -23,6 +23,9 @@ export const useAuthTokenStore = defineStore('authtoken', {
async login(username: string, password: string): Promise<boolean> {
try {
const response = await SshecretAdmin.loginForAccessTokenApiV1TokenPost({ body: { username, password } })
if (!response.data) {
return false
}
const tokenData: Token = response.data
const accessToken = tokenData.access_token
const refreshToken = tokenData.refresh_token
@ -53,6 +56,9 @@ export const useAuthTokenStore = defineStore('authtoken', {
try {
console.log("Refreshing token")
const response = await SshecretAdmin.refreshTokenApiV1RefreshPost({ body: { grant_type: "refresh_token", refresh_token: this.refreshToken } })
if (!response.data) {
return false
}
const tokenData: Token = response.data
const accessToken = tokenData.access_token
const refreshToken = tokenData.refresh_token

View File

@ -1,7 +1,7 @@
// stores/useAlertsStore.ts
import { defineStore } from 'pinia'
interface Alert {
export interface Alert {
id: number
message: string
title?: string