Update AdminEthosVerification to use API_BASE
cgen-7c18dfab450044a6b85a33d01e2c70c5
This commit is contained in:
parent
bca29e4a21
commit
09989fabbb
1 changed files with 5 additions and 2 deletions
|
|
@ -17,6 +17,9 @@ import {
|
||||||
} from "@/components/ui/alert-dialog";
|
} from "@/components/ui/alert-dialog";
|
||||||
import { CheckCircle, XCircle, Clock, ChevronRight, Music } from "lucide-react";
|
import { CheckCircle, XCircle, Clock, ChevronRight, Music } from "lucide-react";
|
||||||
|
|
||||||
|
// API Base URL for fetch requests
|
||||||
|
const API_BASE = import.meta.env.VITE_API_BASE || "";
|
||||||
|
|
||||||
interface VerificationRequest {
|
interface VerificationRequest {
|
||||||
id: string;
|
id: string;
|
||||||
user_id: string;
|
user_id: string;
|
||||||
|
|
@ -59,7 +62,7 @@ export default function AdminEthosVerification() {
|
||||||
const fetchRequests = async () => {
|
const fetchRequests = async () => {
|
||||||
try {
|
try {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const response = await fetch(`/api/ethos/verification?status=${activeTab}`, {
|
const response = await fetch(`${API_BASE}/api/ethos/verification?status=${activeTab}`, {
|
||||||
headers: {
|
headers: {
|
||||||
"x-user-id": user?.id || "",
|
"x-user-id": user?.id || "",
|
||||||
},
|
},
|
||||||
|
|
@ -94,7 +97,7 @@ export default function AdminEthosVerification() {
|
||||||
if (!selectedRequest) return;
|
if (!selectedRequest) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch("/api/ethos/verification", {
|
const response = await fetch(`${API_BASE}/api/ethos/verification`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue