Created
July 25, 2023 13:39
-
-
Save JajoScript/5bc65dbe477e50f9970b242c7b9896f4 to your computer and use it in GitHub Desktop.
Handler ES5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const logger = require("firebase-functions/logger") // Optional logger from Firebase. | |
async function handler(params) { | |
return new Promise(async (resolve, reject) => { | |
try { | |
// Code here ... | |
return resolve(); | |
} catch (err) { | |
logger.warn("something wrong in handler", err); | |
return reject(err); | |
} | |
}); | |
} | |
module.exports = handler; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment