u
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user