Skip to content

Commit

Permalink
Add updateQuestion
Browse files Browse the repository at this point in the history
  • Loading branch information
jq1836 committed Sep 26, 2024
1 parent f9784d4 commit b3a59ca
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions frontend/lib/update-question.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { Question } from "./schemas/question-schema";

export const updateQuestion = async (question: Question) => {
const response = await fetch(
`http://localhost:8000/questions/${question.id}`,
{
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(question),
}
);
return response;
};

0 comments on commit b3a59ca

Please sign in to comment.