jacky-mo-1111 / Bit_Project

The 3rd trial
GNU General Public License v3.0
0 stars 0 forks source link

Week 1: Let me in! #9

Closed counselorbot[bot] closed 2 years ago

counselorbot[bot] commented 2 years ago

Week 1 Step 5 ⬤⬤⬤⬤⬤◯◯◯◯ | 🕐 Estimated completion: 25-35 minutes

Let me in!

✅ Tasks:

🚧 Test your Work

When you paste your Function URL in your browser or make a GET request with Postman with a password parameter of "letmein", you should get a response of “Access granted.“. Otherwise, your function should output “Access denied.“.

‼️ Make sure you follow the exact responses we provided. Access denied. and Access granted.

1: Return from a Function

In the previous step, we received the password (the user's input). Now, we need to return either Access denied. or Access granted. to the user based on their input. We can do this by returning it in the body of the request!

💡 Recall the context.res object we saw in the HTTP Trigger template.

context.res = {
    // status: 200, /* Defaults to 200 */
    body: your_response
};

Place your message to the user in your_response!

📹 Walkthrough Video

walkthrough video

counselorbot[bot] commented 2 years ago

⏰ Time to merge!

Go ahead and merge this branch to main to move on. Great work finishing this section!

merge

⚠️ If you receive a Conflicts error, simply press Resolve conflicts and you should be good to merge!

counselorbot[bot] commented 2 years ago

⚡️ You're ready for Serverless!

Move on to the next issue.

moveon