Fix missing url param when called by server direct

This commit is contained in:
Alicia Sykes 2023-08-06 22:04:57 +01:00
parent 127db45247
commit 65ff004b63

View File

@ -26,7 +26,7 @@ const analyze = async (url) => {
exports.handler = async (event, context, callback) => {
// Validate URL parameter
if (!event.queryStringParameters || !event.queryStringParameters.url) {
if (!(event.queryStringParameters || event.query).url) {
return {
statusCode: 400,
body: JSON.stringify({ error: 'Missing url parameter' }),