Swagger API documentation
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user