|
Last change
on this file since 4f85b41 was 4f85b41, checked in by Andrej <asumanovski@…>, 2 months ago |
|
Daily discipline feature done
|
-
Property mode
set to
100644
|
|
File size:
446 bytes
|
| Rev | Line | |
|---|
| [4f85b41] | 1 | import api from "./axios";
|
|---|
| 2 |
|
|---|
| 3 | export async function computeDailyCompletion(date /* yyyy-mm-dd or undefined */) {
|
|---|
| 4 | const res = await api.post("/discipline/daily-completions/compute", null, {
|
|---|
| 5 | params: date ? { date } : {},
|
|---|
| 6 | });
|
|---|
| 7 | return res?.data;
|
|---|
| 8 | }
|
|---|
| 9 |
|
|---|
| 10 | export async function getDailyCompletions({ page = 0, size = 14 } = {}) {
|
|---|
| 11 | const res = await api.get("/discipline/daily-completions", {
|
|---|
| 12 | params: { page, size },
|
|---|
| 13 | });
|
|---|
| 14 | return res?.data;
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.