Files
DysonNetwork/DysonNetwork.Sphere/Client/src/stores/pub.ts
2025-08-03 21:37:18 +08:00

14 lines
329 B
TypeScript

import { defineStore } from 'pinia'
import { ref } from 'vue'
export const usePubStore = defineStore('pub', () => {
const publishers = ref<any[]>([])
async function fetchPublishers() {
const resp = await fetch('/api/publishers')
publishers.value = await resp.json()
}
return { publishers, fetchPublishers }
})