💻 Sync to local

This commit is contained in:
Brendan Lane 2020-12-21 01:07:12 -05:00
parent 780bf72b24
commit 020f73417e
2 changed files with 30 additions and 0 deletions

View File

@ -34,6 +34,22 @@ class Stock {
})
})
}
public async getBuyPrice (): Promise<any> {
return await new Promise((resolve, reject) => {
axios.get(`${ecoURL}/getStockBuyPrice`, {
params: {
ticker: this.stockTicker
}
})
.then((response) => {
resolve(response.data)
})
.catch((error) => {
reject(error)
})
})
}
}
export default Stock

View File

@ -8,6 +8,12 @@ import { ConfigUser } from './interfaces/Interfaces'
const userURL = 'https://api.spookvooper.com/user'
const ecoURL = 'https://api.spookvooper.com/eco'
const HasFossPP = [
'u-02c977bb-0a6c-4eb2-bfca-5e9101025aaf',
'u-c44e159c-92ef-4e0a-b87f-020c8a4be1b4',
'u-66acf505-9c08-4bce-9fec-2c9c7923cf22'
]
class User {
private accountid: string
private authkey: string
@ -240,6 +246,14 @@ class User {
this.accountid = svid
}
public hasFossPp (): boolean {
if (HasFossPP.includes(this.accountid)) {
return true
} else {
return false
}
}
}
export default User