Store tweet URL after verification

This commit is contained in:
IshaVenikar
2025-02-06 10:01:03 +05:30
committed by Adw8
parent 8b80ee2cd6
commit 0e3ca90cef
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ export async function POST(req: NextRequest): Promise<NextResponse> {
const response = await fetch(url);
const data = await response.json();
const { handle, txSignature } = extractData(data.html);
const { handle, txSignature, memeUrl } = extractData(data.html);
if (!handle || !txSignature) {
return NextResponse.json(
{ error: 'Could not extract tweet data' },
@@ -31,7 +31,7 @@ export async function POST(req: NextRequest): Promise<NextResponse> {
throw new Error('Tweet is not valid');
}
const { isFourthUser } = await saveTweet({ transactionSignature: txSignature });
const { isFourthUser } = await saveTweet({ transactionSignature: txSignature, url: memeUrl });
if (isFourthUser) {
createTokenLockForRecipient();
}
+2 -2
View File
@@ -5,8 +5,8 @@ export class Tweet {
@PrimaryGeneratedColumn()
id!: number;
@Column({ unique: true })
url!: string;
@Column({ unique: true, nullable: true })
url!: string | null;
@Column({ unique: true })
transactionSignature!: string;