|
Last change
on this file since 8449b9c was 8449b9c, checked in by Andrej <asumanovski@…>, 2 months ago |
|
Finance feature
|
-
Property mode
set to
100644
|
|
File size:
672 bytes
|
| Line | |
|---|
| 1 | import api from "./axios";
|
|---|
| 2 |
|
|---|
| 3 | export async function getFinanceStatus() {
|
|---|
| 4 | const res = await api.get("/finance/status");
|
|---|
| 5 | return Boolean(res?.data?.tracking);
|
|---|
| 6 | }
|
|---|
| 7 |
|
|---|
| 8 | export async function startFinanceTracking(payload) {
|
|---|
| 9 | return api.post("/finance/start", payload);
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | export async function getFinanceProfile() {
|
|---|
| 13 | const res = await api.get("/finance/profile");
|
|---|
| 14 | return res?.data;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | export async function getIncomes({ page = 0, size = 5 } = {}) {
|
|---|
| 18 | const res = await api.get("/finance/incomes", { params: { page, size } });
|
|---|
| 19 | return res?.data;
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | export async function createIncome(payload) {
|
|---|
| 23 | const res = await api.post("/finance/incomes", payload);
|
|---|
| 24 | return res?.data;
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.