diff --git a/app.js b/app.js deleted file mode 100644 index 65382c0..0000000 --- a/app.js +++ /dev/null @@ -1,2 +0,0 @@ -var msg = "Hello World"; -console.log(msg); \ No newline at end of file diff --git a/db.config.js b/db.config.js deleted file mode 100644 index 58f2943..0000000 --- a/db.config.js +++ /dev/null @@ -1,80 +0,0 @@ -import Sequelize from "sequelize"; -import * as dotenv from "dotenv"; // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import -dotenv.config(); - -// module.exports = { -// HOST: "localhost", -// USER: "tethys_admin", -// PASSWORD: "tethys_admin007", -// DB: "tethys", -// dialect: "postgres", -// pool: { -// max: 5, -// min: 0, -// acquire: 30000, -// idle: 10000 -// } -// }; - -// const pg = require('pg'); -// pg.types.setTypeParser(1114, (str) => new Date((str.split(' ').join('T'))+'Z')); - - -const dbSchema = process.env.DB_SCHEMA; -const dbName = process.env.DB_NAME; -const dbUser = process.env.DB_USER; -const dbPassword = process.env.DB_PASSWORD; -const dbHost = process.env.DB_HOST; -// const dbDriver = process.env.DB_DRIVER; // as Dialect - -const sequelizeConnection = new Sequelize( - dbName, - dbUser, - dbPassword, - { - schema: dbSchema, - host: dbHost || "localhost", - port: process.env.DB_PORT || 5432, - dialect: "postgres", - dialectOptions: { - ssl: process.env.DB_SSL == "true", - }, - pool: { - max: 10, - min: 0, - acquire: 30000, - idle: 10000, - }, - logging: false, - dialectOptions: { - useUTC: false, //for reading from database - dateStrings: true, - typeCast: true - }, - timezone: '+02:00' //for writing to database - // host: "localhost", - // dialect: 'postgres', - // logging: false - } -); - -sequelizeConnection - .authenticate() - .then(() => { - console.log("Connection has been established successfully."); - }) - .catch((err) => { - console.error("Unable to connect to the database:", err); - }); -export default sequelizeConnection; -// export default sequelizeConnection; - -// // relations -// Dataset.hasMany(Title, { -// as: "titles", -// foreignKey: "document_id" -// }); -// Title.belongsTo(Dataset, { -// foreignKey: "document_id", -// as: "dataset", -// }); diff --git a/notes.txt b/notes.txt index 0ab2452..0f5117c 100644 --- a/notes.txt +++ b/notes.txt @@ -92,4 +92,17 @@ npm install --save redis npm i sprintf-js --save -npm i --save-dev @types/sprintf-js \ No newline at end of file +npm i --save-dev @types/sprintf-js + + + + + + + +======================================== git ============================================================= +git config --global user.name +git config --global user.email + +git remote add origin https://gitea.geologie.ac.at/geolba/tethys.api.git +git push -o repo.private=false --set-upstream origin master \ No newline at end of file diff --git a/src/controllers/oai.controller.ts b/src/controllers/oai.controller.ts index 73435d2..1bb5fa8 100644 --- a/src/controllers/oai.controller.ts +++ b/src/controllers/oai.controller.ts @@ -335,10 +335,10 @@ export class OaiController { */ protected async handleListIdentifiers(oaiRequest: OaiParameter) { // if ("resumptionToken" in oaiRequest) { - if (!this.tokenWorker) { - this.tokenWorker = new TokenWorker(86400); - } - !this.tokenWorker.Connected && (await this.tokenWorker.connect()); + if (!this.tokenWorker) { + this.tokenWorker = new TokenWorker(86400); + } + !this.tokenWorker.Connected && (await this.tokenWorker.connect()); //$maxIdentifier = 5; //$this->_configuration->getMaxListIdentifiers(); const maxIdentifier = this.configuration.maxListIds; //->getMaxListIdentifiers();