adds buy/sell endpoints

This commit is contained in:
2019-08-07 15:34:08 +02:00
parent 6e7a0f6211
commit cb98b97126
5 changed files with 149 additions and 47 deletions

View File

@@ -22,10 +22,12 @@ export default {
},
buyItems(items) {
this.notifications.push(`Would buy ${items.length} items`);
AppStorage.buyItems(items)
.then(_ => this.notifications.push(`Bought ${items.length} items`))
},
sellItems (items) {
this.notifications.push(`Would sell ${items.length} items`);
AppStorage.sellItems(items)
.then(_ => this.notifications.push(`Sold ${items.length} items`))
},
parseLoot (items) {
this.loot = [];