Extend user reminder API endpoints

This commit is contained in:
jude
2024-03-09 16:17:55 +00:00
parent 8f4810b532
commit 3190738fc5
11 changed files with 342 additions and 75 deletions

View File

@ -144,9 +144,9 @@ export const postGuildReminder = (guild: string) => ({
axios.post(`/dashboard/api/guild/${guild}/reminders`, reminder).then((resp) => resp.data),
});
export const deleteGuildReminder = (guild: string) => ({
export const deleteReminder = () => ({
mutationFn: (reminder: Reminder) =>
axios.delete(`/dashboard/api/guild/${guild}/reminders`, {
axios.delete(`/dashboard/api/reminders`, {
data: {
uid: reminder.uid,
},
@ -187,3 +187,7 @@ export const postUserReminder = () => ({
mutationFn: (reminder: Reminder) =>
axios.post(`/dashboard/api/user/reminders`, reminder).then((resp) => resp.data),
});
export const patchUserReminder = () => ({
mutationFn: (reminder: Reminder) => axios.patch(`/dashboard/api/user/reminders`, reminder),
});