Skip to content

Commit

Permalink
🐛 Fix a bug
Browse files Browse the repository at this point in the history
  • Loading branch information
anibalalpizar committed May 20, 2024
1 parent 0faf542 commit 20e9afe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/app/q/[id]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ 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 = https + params.id;
const shortUrl = `${httpConstants.API_URL}q/${params.id}`;

try {
const link = await findLinkInDatabase(shortUrl);
Expand Down
2 changes: 1 addition & 1 deletion src/constants/http.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const API_URL: string = "shortify.art/";
const API_URL: string = "https://shortify.art/";

export const httpConstants = {
API_URL,
Expand Down

1 comment on commit 20e9afe

@vercel
Copy link

@vercel vercel bot commented on 20e9afe 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.