fix: Long collection description prevents import (#3847)

* fix: Long collection description prevents import
fix: Parallelize attachment upload during import

* fix: Improve Notion image import matching

* chore: Bump JSZIP (perf)

* fix: Allow redirect from /doc/<id> to canonical url

* fix: Importing document with only title duplicates title in body
This commit is contained in:
Tom Moor
2022-07-24 09:37:20 +01:00
committed by GitHub
parent 4f537c7578
commit 7ae892fe06
9 changed files with 70 additions and 31 deletions

View File

@@ -24,6 +24,7 @@ import isUUID from "validator/lib/isUUID";
import { MAX_TITLE_LENGTH } from "@shared/constants";
import { sortNavigationNodes } from "@shared/utils/collections";
import { SLUG_URL_REGEX } from "@shared/utils/urlHelpers";
import { CollectionValidation } from "@shared/validations";
import slugify from "@server/utils/slugify";
import { NavigationNode, CollectionSort } from "~/types";
import CollectionGroup from "./CollectionGroup";
@@ -150,8 +151,8 @@ class Collection extends ParanoidModel {
name: string;
@Length({
max: 1000,
msg: `description must be 1000 characters or less`,
max: CollectionValidation.maxDescriptionLength,
msg: `description must be ${CollectionValidation.maxDescriptionLength} characters or less`,
})
@Column
description: string;