Ghost/ghost/extract-api-key/lib/extract-api-key.js
Naz 988acff403 Simplified returned data from api key extraction
refs https://github.com/TryGhost/Toolbox/issues/292

- We can query the data base by the API key itself, there's no need for type of the API  at any point yet
2022-05-10 14:44:55 +08:00

17 lines
269 B
JavaScript

/**
*
* @param {import('express').Request} req
* @returns {string}
*/
const extractAPIKey = (req) => {
let keyValue = null;
if (req.query && req.query.key) {
keyValue = req.query.key;
}
return keyValue;
};
module.exports = extractAPIKey;