Added apiclient method
This commit is contained in:
parent
12aa8eeb3e
commit
839c658075
|
@ -62,6 +62,18 @@ export default class Apiclient {
|
|||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* API-Getter for the linkylinky api all vists endpoint (needs auth)
|
||||
* @returns Url visit details for each visit in an array of objects.
|
||||
*/
|
||||
static async getVisits() {
|
||||
return (
|
||||
await axios.get(`https://kauft.es/api/visits`, {
|
||||
headers: { Authorization: `Bearer ${UserStore.state.token}` }
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* API-Delet for the linkylinky api url deletion endpoint (needs auth)
|
||||
* @param {*} shortcode The shortcode of your most hated url
|
||||
|
|
Loading…
Reference in New Issue