Updates all API functions, to work on both Vercel & Netlify

This commit is contained in:
Alicia Sykes
2023-09-03 12:27:04 +01:00
parent 3695c82472
commit 1a95a42853
33 changed files with 101 additions and 55 deletions

View File

@ -1,7 +1,7 @@
const tls = require('tls');
const middleware = require('./_common/middleware');
const fetchSiteCertificateHandler = async (urlString) => {
const handler = async (urlString) => {
try {
const parsedUrl = new URL(urlString);
const options = {
@ -40,4 +40,5 @@ const fetchSiteCertificateHandler = async (urlString) => {
}
};
exports.handler = middleware(fetchSiteCertificateHandler);
module.exports = middleware(handler);
module.exports.handler = middleware(handler);