File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/collection-api/routes Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ import yaml from 'js-yaml';
66
77import Service from '../../archivist/services/service.js' ;
88
9+ const METADATA_FILENAME = 'metadata.yml' ;
10+ const PACKAGE_JSON_PATH = '../../../package.json' ;
11+
912/**
1013 * @swagger
1114 * tags:
@@ -130,8 +133,8 @@ import Service from '../../archivist/services/service.js';
130133export default async function metadataRouter ( collectionPath , services ) {
131134 const router = express . Router ( ) ;
132135
133- const STATIC_METADATA = yaml . load ( await fs . readFile ( path . join ( collectionPath , '/metadata.yml' ) , 'utf8' ) ) ;
134- const { version : engineVersion } = JSON . parse ( await fs . readFile ( new URL ( '../../../package.json' , import . meta. url ) ) ) ;
136+ const STATIC_METADATA = yaml . load ( await fs . readFile ( path . join ( collectionPath , METADATA_FILENAME ) , 'utf8' ) ) ;
137+ const { version : engineVersion } = JSON . parse ( await fs . readFile ( new URL ( PACKAGE_JSON_PATH , import . meta. url ) ) ) ;
135138
136139 /**
137140 * @swagger
You can’t perform that action at this time.
0 commit comments