From the course: Firebase Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The Make a Reservation function, part 1 - Google Cloud Tutorial
From the course: Firebase Essential Training
The Make a Reservation function, part 1
- The first situation we're going to look at is creating a cloud function to make sure users can only make reservations in a restaurant's open time slots. Now obviously we can't just give users the ability to make these changes directly to the Firestore as we did when we implemented the edit profile page, since the situation requires a little more logic to make sure users are only making permitted changes. So let's go to our function source directory and create a new directory in there called reservations. And then inside there, we're going to create a file called make reservation.JS and we're going to start off by importing the regular things. So import star as functions from Firebase functions and import star as admin from Firebase admin and then we're going to say export const make reservation, and this function is going to be an HTTPS triggered function, but we're going to do something a little different here than…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Control access with Cloud Functions1m 42s
-
(Locked)
Set up to run functions locally7m
-
(Locked)
Run Cloud Functions2m 55s
-
(Locked)
The Make a Reservation function, part 18m 44s
-
(Locked)
The Make a Reservation function, part 25m 12s
-
(Locked)
The Submit Review function11m 37s
-
(Locked)
The Cancel Reservation function7m 17s
-
(Locked)
The Get Recommendations function6m 55s
-
(Locked)
The Search Restaurants function6m 20s
-
-
-
-
-