mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 22:51:53 +00:00
feat(secret-reminders): addressed PR suggestions and improvements
This commit is contained in:
@@ -1,3 +1 @@
|
||||
export { useDeleteReminder } from "./queries";
|
||||
export { useCreateReminder } from "./queries";
|
||||
export { useGetReminder } from "./queries";
|
||||
export { useCreateReminder, useDeleteReminder, useGetReminder } from "./queries";
|
||||
|
||||
@@ -15,9 +15,8 @@ export const useCreateReminder = (secretId: string, projectId: string) => {
|
||||
return useMutation<Reminder, object, CreateReminderDTO>({
|
||||
mutationFn: async ({ message, repeatDays, nextReminderDate, recipients }) => {
|
||||
const { data } = await apiRequest.post<{ reminder: Reminder }>(
|
||||
`/api/v1/reminders/${projectId}/reminder`,
|
||||
`/api/v1/reminders/${projectId}/reminder/${secretId}`,
|
||||
{
|
||||
secretId,
|
||||
message,
|
||||
repeatDays,
|
||||
nextReminderDate,
|
||||
|
||||
@@ -11,11 +11,4 @@ export type DeleteReminderDTO = {
|
||||
reminderId: string;
|
||||
};
|
||||
|
||||
export type Reminder = {
|
||||
id: string;
|
||||
message?: string | null;
|
||||
repeatDays?: number | null;
|
||||
nextReminderDate?: Date | null;
|
||||
secretId: string;
|
||||
recipients?: string[];
|
||||
};
|
||||
export type Reminder = { id: string } & CreateReminderDTO;
|
||||
|
||||
Reference in New Issue
Block a user