mirror of
https://github.com/linkwarden/linkwarden.git
synced 2026-03-03 02:27:00 +00:00
small fix
This commit is contained in:
5
.github/workflows/locale-action.yml
vendored
5
.github/workflows/locale-action.yml
vendored
@@ -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 <bot@linkwarden.app>"' \
|
||||
"$BASE_SHA"
|
||||
git rebase --committer-date-is-author-date --exec 'git commit --amend --no-edit --allow-empty --author="LinkwardenBot <bot@linkwarden.app>"' "$BASE_SHA"
|
||||
|
||||
- name: Push rewritten history
|
||||
run: git push --force-with-lease origin HEAD:i18n
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user