commit
9cfdb714c3
|
@ -171,7 +171,7 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
|
||||||
await page.goBack();
|
await page.goBack();
|
||||||
} else if (!link.preview?.startsWith("archive")) {
|
} else if (!link.preview?.startsWith("archive")) {
|
||||||
console.log("No og:image found");
|
console.log("No og:image found");
|
||||||
page
|
await page
|
||||||
.screenshot({ type: "jpeg", quality: 20 })
|
.screenshot({ type: "jpeg", quality: 20 })
|
||||||
.then((screenshot) => {
|
.then((screenshot) => {
|
||||||
return createFile({
|
return createFile({
|
||||||
|
|
|
@ -88,7 +88,7 @@ async function migrateToV2() {
|
||||||
if (res) {
|
if (res) {
|
||||||
await prisma.link.update({
|
await prisma.link.update({
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { pdfPath: path },
|
data: { pdf: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
console.log(`${link.id}`);
|
||||||
} else {
|
} else {
|
||||||
|
@ -105,7 +105,7 @@ async function migrateToV2() {
|
||||||
if (res) {
|
if (res) {
|
||||||
await prisma.link.update({
|
await prisma.link.update({
|
||||||
where: { id: link.id },
|
where: { id: link.id },
|
||||||
data: { screenshotPath: path },
|
data: { image: path },
|
||||||
});
|
});
|
||||||
console.log(`${link.id}`);
|
console.log(`${link.id}`);
|
||||||
} else {
|
} else {
|
||||||
|
|
Ŝarĝante…
Reference in New Issue