Fix Admin test upload API endpoint URL & fix AI coach infinite reload caused by session polling
This commit is contained in:
@@ -27,7 +27,7 @@ export default function AdminTestsPage() {
|
||||
|
||||
const fetchTests = async () => {
|
||||
try {
|
||||
const res = await fetch("http://localhost:8000/api/admin/tests")
|
||||
const res = await fetch("/api/admin/tests")
|
||||
if (res.ok) {
|
||||
const data = await res.json()
|
||||
setTests(data)
|
||||
@@ -83,7 +83,7 @@ export default function AdminTestsPage() {
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await fetch("http://localhost:8000/api/admin/tests/create_manual", {
|
||||
const res = await fetch("/api/admin/tests/upload", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(payload)
|
||||
|
||||
Reference in New Issue
Block a user