Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

small fix

daniel31x133e015fa76c16
diff --git a/.github/workflows/locale-action.yml b/.github/workflows/locale-action.yml
index ecfee33e..7971ad2a 100644
--- a/.github/workflows/locale-action.yml
+++ b/.github/workflows/locale-action.yml
@@ -36,10 +36,7 @@ jobs:
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
- git rebase --committer-date-is-author-date \
- --exec 'git commit --amend --no-edit --allow-empty \
- --author="LinkwardenBot <[email protected]>"' \
- "$BASE_SHA"
+ git rebase --committer-date-is-author-date --exec 'git commit --amend --no-edit --allow-empty --author="LinkwardenBot <[email protected]>"' "$BASE_SHA"
- name: Push rewritten history
run: git push --force-with-lease origin HEAD:i18n
\ No newline at end of file
diff --git a/apps/web/lib/api/controllers/migration/importFromPocket.ts b/apps/web/lib/api/controllers/migration/importFromPocket.ts
index 7b5cdcdf..be8d30f5 100644
--- a/apps/web/lib/api/controllers/migration/importFromPocket.ts
+++ b/apps/web/lib/api/controllers/migration/importFromPocket.ts
@@ -20,6 +20,8 @@ export default async function importFromPocket(
skipEmptyLines: true,
}).data as PocketBackup;
+ console.log("tags", data);
+
const backup = data.filter((e) => e.url);
let totalImports = backup.length;
@@ -65,8 +67,8 @@ export default async function importFromPocket(
await prisma.link.create({
data: {
- url: link.url?.trim().slice(0, 2047),
- name: link.title?.trim().slice(0, 254) || "",
+ url: link.url?.slice(0, 2047).trim(),
+ name: link.title?.slice(0, 254).trim() || "",
importDate: link.time_added
? new Date(Number(link.time_added) * 1000).toISOString()
: null,
@@ -75,6 +77,22 @@ export default async function importFromPocket(
id: newCollection.id,
},
},
+ tags: {
+ connectOrCreate: link?.tags
+ ? link.tags.split("|").map((tag) => ({
+ where: {
+ name_ownerId: {
+ name: tag?.slice(0, 50).trim() || "",
+ ownerId: userId,
+ },
+ },
+ create: {
+ name: tag?.slice(0, 50).trim() || "",
+ ownerId: userId,
+ },
+ }))
+ : [],
+ },
createdBy: {
connect: {
id: userId,