fix: purchase payloads

This commit is contained in:
Zack Spear
2023-06-20 11:54:30 -05:00
committed by Zack Spear
parent 47bf63c273
commit f8b5db9853
10 changed files with 3749 additions and 350 deletions
+6 -6
View File
@@ -17,30 +17,30 @@ export const usePurchaseStore = defineStore('purchase', () => {
// Actions
const redeem = () => {
console.debug('[redeem]');
callbackStore.send('https://unraid.ddev.site/init-purchase', {
callbackStore.send('https://unraid.ddev.site/init-purchase', [{
server: {
...serverStore.serverPurchasePayload,
},
type: 'redeem',
});
}]);
};
const purchase = () => {
console.debug('[purchase]');
callbackStore.send('https://unraid.ddev.site/init-purchase', {
callbackStore.send('https://unraid.ddev.site/init-purchase', [{
server: {
...serverStore.serverPurchasePayload,
},
type: 'purchase',
});
}]);
};
const upgrade = () => {
console.debug('[upgrade]');
callbackStore.send('https://unraid.ddev.site/init-purchase', {
callbackStore.send('https://unraid.ddev.site/init-purchase', [{
server: {
...serverStore.serverPurchasePayload,
},
type: 'upgrade',
});
}]);
};
const purchaseHide = () => purchaseVisible.value = false;
const purchaseShow = () => purchaseVisible.value = true;
+2
View File
@@ -99,6 +99,8 @@ export const useServerStore = defineStore('server', () => {
return {
deviceCount: deviceCount.value,
guid: guid.value,
registered: registered.value ?? false,
state: state.value,
}
});