Fix admin tests endpoint to create_manual and fix language enum from EN to English
This commit is contained in:
@@ -45,7 +45,7 @@ export default function AdminTestsPage() {
|
||||
|
||||
const handleToggle = async (testId: string) => {
|
||||
try {
|
||||
const res = await fetch(`http://localhost:8000/api/admin/tests/${testId}/toggle`, {
|
||||
const res = await fetch(`/api/admin/tests/${testId}/toggle`, {
|
||||
method: "PUT"
|
||||
})
|
||||
if (res.ok) {
|
||||
@@ -83,7 +83,7 @@ export default function AdminTestsPage() {
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await fetch("/api/admin/tests/upload", {
|
||||
const res = await fetch("/api/admin/tests/create_manual", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(payload)
|
||||
|
||||
Reference in New Issue
Block a user