Skip to content

Commit

Permalink
adding link back
Browse files Browse the repository at this point in the history
  • Loading branch information
julien51 committed Feb 4, 2024
1 parent b0f7d33 commit 9946214
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/app/api/[message]/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface Button {
export const renderMessageForFid = async (
origin: string,
messageId: string,
fid: string | null
fid?: string | null
) => {
const message = await getMessage(messageId);
if (!message) {
Expand Down Expand Up @@ -107,7 +107,7 @@ export const render = async (
})
.join("\n")}
</head>
<body>
<img src="${image}" />
<p>
Expand All @@ -117,6 +117,10 @@ export const render = async (
})
.join("<br />")}
</p>
<p>
<a href="https://warpcast.com/~/compose?text=Check%20this%20frame!&embeds[]=${base}/c/${
message.id
}" target="_blank">Cast-it</a>
</body>
</html>`,
{
Expand Down
3 changes: 1 addition & 2 deletions src/app/c/[message]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export async function GET(
{ params }: { params: { message: string } }
) {
const u = new URL(request.url);
const fid = u.searchParams.get("fid");
return renderMessageForFid(u.origin, params.message, fid);
return renderMessageForFid(u.origin, params.message);
}
2 changes: 0 additions & 2 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { AppConfig } from "@/app/AppConfig";

export const getImage = (
base: string,
message: { id: string },
Expand Down

0 comments on commit 9946214

Please sign in to comment.