Set type for URL in Tweet entity

This commit is contained in:
IshaVenikar 2025-02-06 09:39:12 +05:30 committed by Adw8
parent b5c9cb7956
commit 970b7ae00e
2 changed files with 3 additions and 1 deletions

View File

@ -10,7 +10,9 @@ export async function POST(req: NextRequest): Promise<NextResponse> {
const response = await fetch(url);
const data = await response.json();
const { handle, txSignature, memeUrl } = extractData(data.html);
if (!handle || !txSignature) {
return NextResponse.json(
{ error: 'Could not extract tweet data' },

View File

@ -5,7 +5,7 @@ export class Tweet {
@PrimaryGeneratedColumn()
id!: number;
@Column({ unique: true, nullable: true })
@Column({ type: 'text', unique: true, nullable: true })
url!: string | null;
@Column({ unique: true })