Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83472128
player.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 17, 08:03
Size
610 B
Mime Type
text/x-java
Expires
Thu, Sep 19, 08:03 (2 d)
Engine
blob
Format
Raw Data
Handle
20844050
Attached To
R12546 Sesame - Configurator
player.js
View Options
import { defineStore } from 'pinia';
import { ref } from 'vue';
import { genericFetch, genericAdd, genericUpdate, genericRemove } from './utils';
export const usePlayerStore = defineStore('player', () => {
const state = ref([]);
// not process.env because we use VITE and not vue cli
const endpointURL = import.meta.env.VITE_API_URL + '/players';
const fetch = genericFetch(endpointURL, state);
return {
state, fetch,
add: genericAdd(endpointURL, fetch),
update: genericUpdate(endpointURL, fetch),
remove: genericRemove(endpointURL, fetch)
};
});
Event Timeline
Log In to Comment