fix(learning): remove archive size validation

This commit is contained in:
2026-08-20 14:34:31 +08:00
parent 2168e291b2
commit 85090844b4
6 changed files with 146 additions and 25 deletions

View File

@@ -2,7 +2,6 @@ import { app, dialog, type SaveDialogOptions } from 'electron';
import type { IncomingMessage, ServerResponse } from 'node:http';
import { join } from 'node:path';
import {
LEARNING_ARCHIVE_MAX_BYTES,
LEARNING_MEDIA_MAX_BYTES,
type LearningProjectDetail,
} from '../../../shared/learning';
@@ -166,7 +165,7 @@ function projectSummary(value: unknown): Record<string, unknown> {
cover: projectImage(project.cover),
tags,
version: nullableString(project.version, 64),
archiveBytes: boundedInteger(project.archiveBytes, 1, LEARNING_ARCHIVE_MAX_BYTES),
archiveBytes: boundedInteger(project.archiveBytes, 1, Number.MAX_SAFE_INTEGER),
publishedAt: isoTimestamp(project.publishedAt),
updatedAt: isoTimestamp(project.updatedAt),
};