diff --git a/README.md b/README.md index 9883b1f9..b9895a07 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Greenkeeper badge](https://badges.greenkeeper.io/nzzdev/Q-server.svg)](https://greenkeeper.io/) -**Maintainer**: [Sharon Funke](https://github.com/fuenkchen) +**Maintainer**: [Manuel Roth](https://github.com/manuelroth) __Q__ is a system that lets journalists create visual elements for stories. It is developed by [NZZ Editorial Tech](https://twitter.com/NZZEditoTech) and [NZZ Visuals](https://twitter.com/NZZVisuals) and used in the [NZZ](https://www.nzz.ch) newsroom. There is a Demo over here: https://editor.q.tools diff --git a/package-lock.json b/package-lock.json index 52dfe7c8..face02c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@nzz/q-server", - "version": "10.0.3", + "version": "10.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -812,7 +812,8 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "ansi-styles": { "version": "3.2.1", @@ -1593,7 +1594,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "content-disposition": { "version": "0.5.3", @@ -2355,7 +2357,8 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/fast-future/-/fast-future-1.0.2.tgz", "integrity": "sha1-hDWpqqAteSSNF9cE52JZMB2ZKAo=", - "dev": true + "dev": true, + "optional": true }, "fast-glob": { "version": "3.1.1", @@ -2624,6 +2627,7 @@ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -3390,6 +3394,7 @@ "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.0.tgz", "integrity": "sha512-01PKZumFhgysuHUbRz4c9DyA1egmcHJBAsZbm0Vf5agojC3uWOvAnhOD4swNUgHlfJBymXLi/xkBaEckeNRSvA==", "dev": true, + "optional": true, "requires": { "xtend": "^4.0.2" } @@ -3409,6 +3414,7 @@ "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.0.2.tgz", "integrity": "sha512-Ib6ygFYBleS8x2gh3C1AkVsdrUShqXpe6jSTnZ6sRycEXKhqVf+xOSkhgSnjidpPzyv0d95LJVFrYQ4NuXAqHA==", "dev": true, + "optional": true, "requires": { "abstract-leveldown": "~6.0.0", "fast-future": "~1.0.2", @@ -3646,6 +3652,7 @@ "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -3655,7 +3662,8 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true + "dev": true, + "optional": true } } }, @@ -3749,7 +3757,8 @@ "version": "1.8.2", "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-1.8.2.tgz", "integrity": "sha512-Tr0DNY4RzTaBG2W2m3l7ZtFuJChTH6VZhXVhkGGjF/4cZTt+i8GcM9ozD+30Lmr4mDoZ5Xx34t2o4GJqYWDGcg==", - "dev": true + "dev": true, + "optional": true }, "natural-compare": { "version": "1.4.0", @@ -3822,7 +3831,8 @@ "version": "3.8.0", "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-3.8.0.tgz", "integrity": "sha512-bYbpIHyRqZ7sVWXxGpz8QIRug5JZc/hzZH4GbdT9HTZi6WmKCZ8GLvP8OZ9TTiIBvwPFKgtGrlWQSXDAvYdsPw==", - "dev": true + "dev": true, + "optional": true }, "node-pre-gyp": { "version": "0.11.0", @@ -4380,7 +4390,8 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.0.tgz", "integrity": "sha512-c5mRlguI/Pe2dSZmpER62rSCu0ryKmWddzRYsuXc50U2/g8jMOulc31VZMa4mYx31U5xsmSOpDCgH88Vl9cDGQ==", - "dev": true + "dev": true, + "optional": true }, "pouchdb-adapter-utils": { "version": "7.0.0", @@ -4402,6 +4413,7 @@ "resolved": "https://registry.npmjs.org/pouchdb-binary-utils/-/pouchdb-binary-utils-7.0.0.tgz", "integrity": "sha512-yUktdOPIPvOVouCjJN3uop+bCcpdPwePrLm9eUAZNgEYnUFu0njdx7Q0WRsZ7UJ6l75HinL5ZHk4bnvEt86FLw==", "dev": true, + "optional": true, "requires": { "buffer-from": "1.1.0" } @@ -4410,13 +4422,15 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/pouchdb-collections/-/pouchdb-collections-7.0.0.tgz", "integrity": "sha512-DaoUr/vU24Q3gM6ghj0va9j/oBanPwkbhkvnqSyC3Dm5dgf5pculNxueLF9PKMo3ycApoWzHMh6N2N8KJbDU2Q==", - "dev": true + "dev": true, + "optional": true }, "pouchdb-errors": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pouchdb-errors/-/pouchdb-errors-7.0.0.tgz", "integrity": "sha512-dTusY8nnTw4HIztCrNl7AoGgwvS1bVf/3/97hDaGc4ytn72V9/4dK8kTqlimi3UpaurohYRnqac0SGXYP8vgXA==", "dev": true, + "optional": true, "requires": { "inherits": "2.0.3" } @@ -4436,6 +4450,7 @@ "resolved": "https://registry.npmjs.org/pouchdb-md5/-/pouchdb-md5-7.0.0.tgz", "integrity": "sha512-yaSJKhLA3QlgloKUQeb2hLdT3KmUmPfoYdryfwHZuPTpXIRKTnMQTR9qCIRUszc0ruBpDe53DRslCgNUhAyTNQ==", "dev": true, + "optional": true, "requires": { "pouchdb-binary-utils": "7.0.0", "spark-md5": "3.0.0" @@ -4445,13 +4460,15 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/pouchdb-merge/-/pouchdb-merge-7.0.0.tgz", "integrity": "sha512-tci5u6NpznQhGcPv4ho1h0miky9rs+ds/T9zQ9meQeDZbUojXNaX1Jxsb0uYEQQ+HMqdcQs3Akdl0/u0mgwPGg==", - "dev": true + "dev": true, + "optional": true }, "pouchdb-utils": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pouchdb-utils/-/pouchdb-utils-7.0.0.tgz", "integrity": "sha512-1bnoX1KdZYHv9wicDIFdO0PLiVIMzNDUBUZ/yOJZ+6LW6niQCB8aCv09ZztmKfSQcU5nnN3fe656tScBgP6dOQ==", "dev": true, + "optional": true, "requires": { "argsarray": "0.0.1", "clone-buffer": "1.0.0", @@ -4467,7 +4484,8 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", - "dev": true + "dev": true, + "optional": true } } }, diff --git a/package.json b/package.json index bc1a3c32..fa74170a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nzz/q-server", - "version": "10.0.3", + "version": "10.0.4", "description": "", "main": "index.js", "scripts": { diff --git a/plugins/core/base/routes/search.js b/plugins/core/base/routes/search.js index 49b08d98..3cd8893b 100644 --- a/plugins/core/base/routes/search.js +++ b/plugins/core/base/routes/search.js @@ -6,7 +6,10 @@ module.exports = { options: { auth: { strategy: "q-auth", - mode: "try" + mode: "try", + }, + cors: { + credentials: true, }, validate: { query: { @@ -19,10 +22,10 @@ module.exports = { department: Joi.string().optional(), publication: Joi.string().optional(), active: Joi.boolean().optional(), - searchString: Joi.string().optional() - } + searchString: Joi.string().optional(), + }, }, - tags: ["api", "editor"] + tags: ["api", "editor"], }, handler: async (request, h) => { // Creates new object filterProperties which contains all properties but bookmark and limit @@ -33,8 +36,8 @@ module.exports = { bookmark, session: { credentials: request.auth.credentials, - artifacts: request.auth.artifacts - } + artifacts: request.auth.artifacts, + }, }); - } + }, };