mirror of
https://github.com/arkorty/Reduce.git
synced 2026-03-18 00:47:10 +00:00
Chore: clean-up and refactor
This commit is contained in:
@@ -9,7 +9,7 @@ export async function GET(request, { params }) {
|
||||
|
||||
try {
|
||||
const response = await axios.get(
|
||||
`${process.env.NEXT_PUBLIC_BACKEND_URL}/reduce/${id}`,
|
||||
`${process.env.NEXT_PUBLIC_BACKEND_URL}/reduce/${id}`
|
||||
);
|
||||
if (response.status === 200) {
|
||||
return NextResponse.redirect(response.data.long_url);
|
||||
|
||||
@@ -8,7 +8,7 @@ const inter = Inter({ subsets: ["latin"] });
|
||||
|
||||
export const metadata = {
|
||||
title: "Reduce",
|
||||
description: "A simple URL shortener application",
|
||||
description: "A simple URL shortener application.",
|
||||
icons: {
|
||||
icon: "/favicon.ico",
|
||||
},
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function Home() {
|
||||
{
|
||||
long_url: longUrl,
|
||||
base_url: baseURL,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
setShortUrl(response.data.short_url);
|
||||
|
||||
Reference in New Issue
Block a user