- rename 'prefixes' folder to 'assets'

This commit is contained in:
Arno Kaimbacher 2022-11-11 09:21:16 +01:00
parent 83685b68ed
commit b754f02210
8 changed files with 10 additions and 11 deletions

View File

@ -10,7 +10,7 @@
<!--<xsl:param name="urnResolverUrl" />-->
<!-- add include here for each new metadata format -->
<xsl:include href="prefixes/oai_datacite.xslt" />
<xsl:include href="assets/oai_datacite.xslt" />
<xsl:output method="xml" indent="yes" encoding="utf-8" />
@ -47,7 +47,7 @@
<xsl:template match="/root">
<!-- stylesheet for browser -->
<xsl:processing-instruction name="xml-stylesheet">
<xsl:text>type="text/xsl" href="../prefixes/oai2_style.xslt" title="Defaultstyle"</xsl:text>
<xsl:text>type="text/xsl" href="../assets/oai2_style.xslt" title="Defaultstyle"</xsl:text>
</xsl:processing-instruction>
<OAI-PMH xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

View File

@ -9,7 +9,7 @@ node index.js
npm install --save cors
postgres:
npm install express sequelize pg pg-hstore --save
neu typescript: -----wieder deinstalliert

View File

@ -14,7 +14,7 @@ export class App extends Server {
constructor() {
super();
// this.app = express();
this.app.use('/prefixes', express.static(path.join(__dirname, '../prefixes')));
this.app.use('/assets', express.static(path.join(__dirname, '../assets')));
this.applyMiddleWares();
// init db and add routes
this.boostrap();
@ -60,7 +60,7 @@ export class App extends Server {
this.app.use("/api/", HomeRoutes);
this.app.get("/", (request, response) => {
// response.send('Hello World, from express');
response.sendFile("/home/administrator/api/new-book.html");
response.sendFile("/home/administrator/tethys.api/new-book.html");
});
// Error handling middleware

File diff suppressed because one or more lines are too long

View File

@ -30,14 +30,13 @@ export class FileController {
"Content-Transfer-Encoding": "binary",
});
res.status(StatusCodes.OK).sendFile(filePath);
} catch (err) {
} catch (err) {
// console.log("no access:", path);
res.status(StatusCodes.NOT_FOUND).send({
message: `File with id ${id} doesn't exist on file server`,
});
}
}
// res.status(StatusCodes.OK).sendFile(filePath, (err) => {
// // res.setHeader("Content-Type", "application/json");
// // res.removeHeader("Content-Disposition");

View File

@ -7,7 +7,7 @@ import { XMLBuilder } from "xmlbuilder2/lib/interfaces";
import { readFileSync } from "fs";
// @ts-ignore
import { transform } from "saxon-js";
import dayjs, { Dayjs, OpUnitType } from "dayjs";
import dayjs, { Dayjs } from "dayjs";
import { Dataset, Project, License } from "../models/init-models";
import Logger from "jet-logger";
import { BadOaiModelException, OaiModelException } from "../exceptions/OaiModelException";