diff --git a/reminder-dashboard/src/api.ts b/reminder-dashboard/src/api.ts
index bb336c3..76eca8a 100644
--- a/reminder-dashboard/src/api.ts
+++ b/reminder-dashboard/src/api.ts
@@ -49,7 +49,7 @@ export type Reminder = {
};
export type Todo = {
- id: string;
+ id: number;
channel_id: string;
value: string;
};
@@ -59,6 +59,10 @@ export type CreateTodo = {
value: string;
};
+export type UpdateTodo = {
+ value: string;
+};
+
export type ChannelInfo = {
id: string;
name: string;
@@ -210,7 +214,7 @@ export const fetchGuildTodos = (guild: string) => ({
});
export const patchGuildTodo = (guild: string) => ({
- mutationFn: (todo: Todo) => axios.patch(`/dashboard/api/guild/${guild}/todos`, todo),
+ mutationFn: ({ id, todo }) => axios.patch(`/dashboard/api/guild/${guild}/todos/${id}`, todo),
});
export const postGuildTodo = (guild: string) => ({
diff --git a/reminder-dashboard/src/components/Guild/GuildTodos.tsx b/reminder-dashboard/src/components/Guild/GuildTodos.tsx
index c51402e..5e35c2a 100644
--- a/reminder-dashboard/src/components/Guild/GuildTodos.tsx
+++ b/reminder-dashboard/src/components/Guild/GuildTodos.tsx
@@ -15,7 +15,9 @@ export const GuildTodos = () => {
return