Last active
July 1, 2017 18:21
-
-
Save atbe/0405f220bd0a6133d4615654212558f6 to your computer and use it in GitHub Desktop.
Firebase Functions Simple getUser Route
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
import * as functions from "firebase-functions"; | |
admin.initializeApp(functions.config().firebase); | |
// ... | |
exports.getUser = functions.https.onRequest((req, res) => { | |
// ... | |
// note, req.query.uid might be null! If we use a router, the function will never get matched unless the route is matched correctly | |
const uid = req.query.uid; | |
// ... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment