transactions are now printing to the page

This commit is contained in:
Annika
2022-07-11 15:12:27 -06:00
parent 10d044cb0e
commit 6455c02d5e
6 changed files with 86 additions and 19 deletions
@@ -0,0 +1,22 @@
import { AppState } from "../AppState"
import { logger } from "../utils/Logger"
import { api } from "./AxiosService"
// TODO build the service to get some real data
class TransactionsService {
// async createProject(body){
// const res = await api.post('api/projects', body)
// logger.log('created project', res.data)
// AppState.accountProjects.push(res.data)
// }
async getAll() {
const res = await api.get('api/transactions')
// logger.log('transactions: ' + res.data)
AppState.transactions = res.data
}
}
export const transactionsService = new TransactionsService()