Minor changes for API format and token loading
This commit is contained in:
@@ -41,7 +41,7 @@ function formatPrice(price) {
|
|||||||
<div v-for="auction in data" :key="auction.id" class="card" role="listitem">
|
<div v-for="auction in data" :key="auction.id" class="card" role="listitem">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h2 class="h5">{{ auction.name }}</h2>
|
<h2 class="h5">{{ auction.name }}</h2>
|
||||||
<p class="text-end">{{ formatPrice(auction.current_bid || auction.starting_price) }}</p>
|
<p class="text-end">{{ formatPrice(auction.currentBid || auction.startingPrice) }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ const LOCAL_STORAGE_KEY="token"
|
|||||||
|
|
||||||
export const Anonymous = Symbol("anonymous")
|
export const Anonymous = Symbol("anonymous")
|
||||||
class Token {
|
class Token {
|
||||||
constructor({token, expiresAt}) {
|
constructor({token, expiresAt, userId}) {
|
||||||
this.token = token
|
this.token = token
|
||||||
this.expiresAt = new Date(expiresAt)
|
this.expiresAt = new Date(expiresAt)
|
||||||
|
this.userId = userId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user