feat (backend): Add preview API

- POST /api/preview/sub for previewing subs
- POST /api/preview/collection for previewing collection
This commit is contained in:
Peng-YM
2022-07-01 17:36:48 +08:00
parent bb87a6c41e
commit 606cfed8da
8 changed files with 120 additions and 11 deletions

View File

@@ -14,6 +14,7 @@ import registerCollectionRoutes from './collections';
import registerArtifactRoutes from './artifacts';
import registerDownloadRoutes from './download';
import registerSettingRoutes from './settings';
import registerPreviewRoutes from './preview';
export default function serve() {
const $app = express({ substore: $ });
@@ -22,6 +23,7 @@ export default function serve() {
registerCollectionRoutes($app);
registerSubscriptionRoutes($app);
registerDownloadRoutes($app);
registerPreviewRoutes($app);
registerSettingRoutes($app);
registerArtifactRoutes($app);