Skip to content

Commit

Permalink
🐛 Some fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anibalalpizar committed May 20, 2024
1 parent a99c445 commit 0faf542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/q/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import { httpConstants } from "@/constants/http";
import { Params } from "@/types/link";
import { NextResponse } from "next/server";

const https = "https://shortify.art/q/";

export async function GET(request: Request, { params }: { params: Params }) {
await connectToDatabase();
const shortUrl = `${httpConstants.API_URL}q/${params.id}`;
const shortUrl = https + params.id;

try {
const link = await findLinkInDatabase(shortUrl);
Expand Down
1 change: 1 addition & 0 deletions src/components/card-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export function CardDemo({ className, ...props }: CardProps) {
}

shortenLink(originalUrl);
setOriginalUrl("");
};

React.useEffect(() => {
Expand Down

1 comment on commit 0faf542

@vercel
Copy link

@vercel vercel bot commented on 0faf542 May 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.