fixes api
This commit is contained in:
1 parent
1f2a940968
commit
089aaf9a6d
2 files changed
+13
-3
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { api } from '../lootalot.js'
|
||||
|
||||
export default {
|
||||
props: ["id"],
|
||||
props: ["id", "players"],
|
||||
data () { return {
|
||||
player: {
|
||||
name: "Loading",
|
||||
@@ -76,7 +76,15 @@ export default {
|
||||
putClaim (itemId) { this.call("claims", "PUT", itemId) },
|
||||
withdrawClaim (itemId) { this.call("claims", "DELETE", itemId) },
|
||||
buyItems(items) { this.call("loot", "PUT", items) },
|
||||
sellItems (items) { this.call("loot", "DELETE", { items, global_mod: null, players: null }) },
|
||||
sellItems (items) {
|
||||
let players;
|
||||
if (this.player.id == 0) {
|
||||
players = this.players;
|
||||
} else {
|
||||
players = null;
|
||||
}
|
||||
this.call("loot", "DELETE", { items, global_mod: null, players })
|
||||
},
|
||||
undoLastAction () { this.call("events/last", "DELETE", null) },
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in new issue
Block a user