This commit is contained in:
seb
2026-10-10 05:52:15 +02:00
parent c012b82af3
commit eed10ea38d
5 changed files with 325 additions and 4 deletions

View File

@@ -89,7 +89,7 @@ function requireSelectedCompany(req) {
* @param {string} raw
* @returns {{ name: string } | { error: string }}
*/
function parseVfsRef(raw) {
export function parseVfsRef(raw) {
if (typeof raw !== 'string' || !raw.trim()) {
return { error: 'path is required' };
}
@@ -136,7 +136,7 @@ function parseVfsRef(raw) {
return { name: normalized, mime, canThumbnail, isInline };
}
function vfsFileErrorStatus(error) {
export function vfsFileErrorStatus(error) {
if (error.message === 'No company selected') return 400;
if (error.message === 'Not authorized') return 403;
if (error.message === 'File not found') return 404;