feat(app): add GET config route

This commit is contained in:
ItzCrazyKns
2025-03-18 10:25:09 +05:30
parent 6c227cab6f
commit 97f6196d9b
2 changed files with 57 additions and 2 deletions

View File

@ -116,7 +116,7 @@ const Page = () => {
useEffect(() => {
const fetchConfig = async () => {
setIsLoading(true);
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`, {
const res = await fetch(`/api/config`, {
headers: {
'Content-Type': 'application/json',
},
@ -208,7 +208,7 @@ const Page = () => {
key.toLowerCase().includes('api') ||
key.toLowerCase().includes('url')
) {
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`, {
const res = await fetch(`/api/config`, {
headers: {
'Content-Type': 'application/json',
},