1 00:00:01,040 --> 00:00:06,350 Our daily blog post is now working so we can now move on to our edit blog post as well inside of edit 2 00:00:06,350 --> 00:00:07,070 blog post. 3 00:00:07,070 --> 00:00:12,020 All we have to do is take our updated title and content and send it to our back and server inside of 4 00:00:12,020 --> 00:00:13,170 a PUT request. 5 00:00:13,340 --> 00:00:18,950 Remember a PUT request is used any time that we want to update a record with a given I.D. So let's get 6 00:00:18,950 --> 00:00:21,390 to it inside of edit blog post. 7 00:00:21,560 --> 00:00:26,750 I'm going to mark this function as async and then inside of here we'll do in a wait. 8 00:00:26,780 --> 00:00:33,390 Jason server doc put I'll again use a back tick to indicate that I want to use a template string we'll 9 00:00:33,410 --> 00:00:41,800 do slash blog posts slash and then dollar sign curly brace I.D. then to tell Jason server what we want 10 00:00:41,800 --> 00:00:45,730 to use for the updated content we have to provide a second argument. 11 00:00:45,730 --> 00:00:50,590 The second argument is going to be an object with our updated title and content which we already provided 12 00:00:50,590 --> 00:00:51,950 to this function. 13 00:00:52,090 --> 00:00:58,440 So inside of here we'll do title and content like so and that should be at OK. 14 00:00:58,490 --> 00:01:03,570 So I'll save this will then tested this out really quickly so I'm going to edit a blog post number 4 15 00:01:03,570 --> 00:01:09,870 down here so I'll tap on that one I'll tap on edit and then I'm gonna add in a longer title so I'll 16 00:01:09,870 --> 00:01:10,550 do something like. 17 00:01:10,560 --> 00:01:16,380 Updated blog post number 4 I'll then save the post and there we go. 18 00:01:16,590 --> 00:01:18,360 If I go back to the original screen. 19 00:01:18,440 --> 00:01:19,160 Very good. 20 00:01:19,920 --> 00:01:21,110 OK so that's pretty much it. 21 00:01:21,140 --> 00:01:27,850 We've now got full create read update and destroy across our entire blog post dataset. 22 00:01:27,900 --> 00:01:30,430 It's now our application is pretty much complete. 23 00:01:30,440 --> 00:01:31,930 That's pretty much it. 24 00:01:31,960 --> 00:01:33,130 So let's take a pause right here. 25 00:01:33,140 --> 00:01:34,550 We're gonna come back the next video. 26 00:01:34,550 --> 00:01:37,850 We're gonna wrap up on some really important ideas out of this application.