Fix admin tests endpoint to create_manual and fix language enum from EN to English

This commit is contained in:
2026-07-09 18:03:35 +05:30
parent 4a899f63e8
commit 7c5acbd823
3 changed files with 178 additions and 2 deletions

View File

@@ -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)