forked from mito-systems/sol-mem-gen
Set type for URL in Tweet entity
This commit is contained in:
parent
b5c9cb7956
commit
970b7ae00e
@ -10,7 +10,9 @@ export async function POST(req: NextRequest): Promise<NextResponse> {
|
|||||||
|
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
const { handle, txSignature, memeUrl } = extractData(data.html);
|
const { handle, txSignature, memeUrl } = extractData(data.html);
|
||||||
|
|
||||||
if (!handle || !txSignature) {
|
if (!handle || !txSignature) {
|
||||||
return NextResponse.json(
|
return NextResponse.json(
|
||||||
{ error: 'Could not extract tweet data' },
|
{ error: 'Could not extract tweet data' },
|
||||||
|
@ -5,7 +5,7 @@ export class Tweet {
|
|||||||
@PrimaryGeneratedColumn()
|
@PrimaryGeneratedColumn()
|
||||||
id!: number;
|
id!: number;
|
||||||
|
|
||||||
@Column({ unique: true, nullable: true })
|
@Column({ type: 'text', unique: true, nullable: true })
|
||||||
url!: string | null;
|
url!: string | null;
|
||||||
|
|
||||||
@Column({ unique: true })
|
@Column({ unique: true })
|
||||||
|
Loading…
Reference in New Issue
Block a user