mirror of
https://github.com/Lissy93/web-check.git
synced 2025-07-07 15:56:50 +02:00
Updates all API functions, to work on both Vercel & Netlify
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
const https = require('https');
|
||||
const middleware = require('./_common/middleware');
|
||||
|
||||
exports.handler = middleware(async (url, event, context) => {
|
||||
const handler = async (url, event, context) => {
|
||||
const errorResponse = (message, statusCode = 500) => {
|
||||
return {
|
||||
statusCode: statusCode,
|
||||
@ -53,5 +53,8 @@ exports.handler = middleware(async (url, event, context) => {
|
||||
|
||||
req.end();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = middleware(handler);
|
||||
module.exports.handler = middleware(handler);
|
||||
|
||||
|
Reference in New Issue
Block a user