mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 21:46:49 +00:00
feat(storage): retire photos as a configurable category — served-only via the ServedCategory seam
This commit is contained in:
@@ -127,17 +127,21 @@ describe('storageConfigSchema wire compatibility', () => {
|
||||
expect(storageConfigSchema.safeParse({ backends: [], categories: { backups: '' } }).success).toBe(false);
|
||||
});
|
||||
|
||||
it('exposes the canonical nine-category list (relocated from the server)', () => {
|
||||
it('exposes the canonical eight-category list — photos is served-legacy, retired from config', () => {
|
||||
expect(STORAGE_CATEGORIES).toEqual([
|
||||
'files',
|
||||
'journey',
|
||||
'covers',
|
||||
'avatars',
|
||||
'places',
|
||||
'photos',
|
||||
'photos-google',
|
||||
'photos-trek',
|
||||
'backups',
|
||||
]);
|
||||
});
|
||||
|
||||
it('rejects the retired photos category in a config document', () => {
|
||||
const result = storageConfigSchema.safeParse({ backends: [], categories: { photos: 'uploads-local' } });
|
||||
expect(result.success).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -17,9 +17,11 @@ import { z } from 'zod';
|
||||
*/
|
||||
|
||||
/**
|
||||
* Canonical category list — relocated here from server storage.types.ts
|
||||
* (which re-exports it) because the wire schema needs it and a second copy
|
||||
* is forbidden.
|
||||
* Canonical CONFIGURABLE category list — relocated here from server
|
||||
* storage.types.ts (which re-exports it) because the wire schema needs it and
|
||||
* a second copy is forbidden. The legacy `photos` directory is served and
|
||||
* backed up but not configurable — the server's SERVED_CATEGORIES extension
|
||||
* (storage.types.ts) carries it.
|
||||
*/
|
||||
export const STORAGE_CATEGORIES = [
|
||||
'files',
|
||||
@@ -27,7 +29,6 @@ export const STORAGE_CATEGORIES = [
|
||||
'covers',
|
||||
'avatars',
|
||||
'places',
|
||||
'photos',
|
||||
'photos-google',
|
||||
'photos-trek',
|
||||
'backups',
|
||||
|
||||
Reference in New Issue
Block a user