Skip to content

Commit

Permalink
update api url
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Oct 6, 2024
1 parent 7550182 commit 813119a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/web/src/pages/api/non-ssl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { fetch } from 'undici';
export default async function handler(req: NextApiRequest, res: NextApiResponse) {

try {
const apiUrl = process.env.NEXT_PUBLIC_API_URL
const apiUrl = "https://lavainfo-api.deno.dev"

if (!apiUrl) {
throw new Error('API URL is not defined in the environment variables.');
Expand All @@ -26,11 +26,11 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const apiNodes = await apiNodesResponse.json() as any

apiNodes.sort((a: any, b: any) => b.isConnected - a.isConnected);

return res.status(200).json(apiNodes);
} catch (error) {
res.status(500).json({ error: 'An error occurred while fetching SSL nodes.' });
} finally {

}
};
2 changes: 1 addition & 1 deletion apps/web/src/pages/api/ssl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { fetch } from 'undici';
export default async function handler(req: NextApiRequest, res: NextApiResponse) {

try {
const apiUrl = process.env.NEXT_PUBLIC_API_URL;
const apiUrl = "https://lavainfo-api.deno.dev";

if (!apiUrl) {
throw new Error('API URL is not defined in the environment variables.');
Expand Down

0 comments on commit 813119a

Please sign in to comment.