Swagger API documentation

This commit is contained in:
2024-12-09 19:06:50 +01:00
parent a58adbcc8d
commit 4498c865f2
18 changed files with 1383 additions and 121 deletions

View File

@@ -238,7 +238,7 @@ export const useAccountStore = defineStore("accountStore", {
async refreshOrders() {
this.fetchInProgress = true
await fetchUserOrders(this.userAccount.id)
await fetchUserOrders(this.userAccount.id, this.userAccountToken)
.then(result => {
this.orders = result.data
this.fetchInProgress = false
@@ -344,7 +344,7 @@ export const useAccountStore = defineStore("accountStore", {
async deleteAccount(account: AccountModel) {
this.fetchInProgress = true
deleteAccount(account)
deleteAccount(account, this.userAccountToken)
.then(response => {
this.fetchInProgress = false
})

View File

@@ -100,10 +100,10 @@ export const useBasketStore = defineStore('basketStore', {
const exerciseStore = useExerciseStore()
await createOrder(
accountStore.userAccount.id,
this.itemsInBasket,
this.usedPayment.id,
this.usedAddress.id
this.usedAddress.id,
accountStore.userAccountToken
)
.then(async result => {
if (result.status == 201) {

View File

@@ -40,10 +40,10 @@ export const useOrderStore = defineStore("orderStore", {
*
* @param user User to request orders from
*/
async getOrdersOfAccount(user: AccountModel) {
async getOrdersOfAccount(user: AccountModel, token: string) {
this.fetchInProgress = true
fetchUserOrders(user.id)
fetchUserOrders(user.id, token)
.then(res => {
this.orders = res.data
this.fetchInProgress = false