mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
988acff403
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
17 lines
269 B
JavaScript
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;
|