- added new class CollectionRole.ts
All checks were successful
CI Pipeline / japa-tests (push) Successful in 50s

- added relation 'collectionRole' to Collection.ts class
- added 'ListSets' and  =GetRecord request for OaiController.ts
- npm updates
- added utility-functions.ts
This commit is contained in:
Kaimbacher 2023-09-28 22:43:46 +02:00
parent ebb24cc75c
commit 2a7480d2ed
9 changed files with 349 additions and 91 deletions

View file

@ -33,8 +33,8 @@ import ClamScan from 'clamscan';
import { ValidationException } from '@ioc:Adonis/Core/Validator';
import Drive from '@ioc:Adonis/Core/Drive';
import { Exception } from '@adonisjs/core/build/standalone';
import XmlModel from 'App/Library/XmlModel';
import { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
// import XmlModel from 'App/Library/XmlModel';
// import { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
export default class DatasetController {
public async index({ auth, request, inertia }: HttpContextContract) {
@ -579,23 +579,6 @@ export default class DatasetController {
'files.extnames': 'file extension is not supported',
};
private async getDatasetXmlDomNode(dataset: Dataset) {
// dataset.fetchValues();
const xmlModel = new XmlModel(dataset);
// xmlModel.setModel(dataset);
xmlModel.excludeEmptyFields();
xmlModel.caching = true;
// const cache = dataset.xmlCache ? dataset.xmlCache : null;
// dataset.load('xmlCache');
if (dataset.xmlCache) {
xmlModel.xmlCache = dataset.xmlCache;
}
// return cache.getDomDocument();
const domDocument: XMLBuilder | null = await xmlModel.getDomDocument();
return domDocument;
}
// public async release({ params, view }) {
public async release({ request, inertia, response }: HttpContextContract) {
const id = request.param('id');