Add routes for getting/posting user reminders

This commit is contained in:
jude
2024-03-05 20:36:38 +00:00
parent dbe8e8e358
commit 5f0aa0f834
12 changed files with 381 additions and 66 deletions

View File

@ -182,3 +182,8 @@ export const fetchUserReminders = () => ({
axios.get(`/dashboard/api/user/reminders`).then((resp) => resp.data) as Promise<Reminder[]>,
staleTime: OTHER_STALE_TIME,
});
export const postUserReminder = () => ({
mutationFn: (reminder: Reminder) =>
axios.post(`/dashboard/api/user/reminders`, reminder).then((resp) => resp.data),
});