charts fetch data + cards
This commit is contained in:
parent
9f0c6a8ad4
commit
7b1214e42f
3 changed files with 71 additions and 2 deletions
17
src/api/charts.js
Normal file
17
src/api/charts.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import { apiClient } from '@/services/apiClient.js'
|
||||
|
||||
export const useChartsApi = () => {
|
||||
const getChartsPrices = async (days) => {
|
||||
console.log(days)
|
||||
const response = await apiClient.get('/prices', { days: days })
|
||||
if (response.status === 200) {
|
||||
return response
|
||||
} else {
|
||||
console.log('Add merch error: ', response)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
getChartsPrices,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue