1 00:00:00,180 --> 00:00:00,660 Excellent. 2 00:00:00,660 --> 00:00:08,460 Once we add our products data we should be able to access them on local host 13 37 and then whatever 3 00:00:08,460 --> 00:00:12,820 name we used for our content type which in our case was product. 4 00:00:12,840 --> 00:00:19,950 But notice how I use the word should because by default you want you see by default strappy restrict 5 00:00:20,070 --> 00:00:26,310 access to our data and we as admins need to set up permissions and just to show that I'm not making 6 00:00:26,310 --> 00:00:26,810 this up. 7 00:00:26,910 --> 00:00:34,040 I'm gonna open up a new browser tab and I'm going to look for local host on the euros thirteen thirty 8 00:00:34,040 --> 00:00:40,380 seven and then instead of admin we're going to look for these products because again that was our content 9 00:00:40,390 --> 00:00:46,290 type and we check it out and we can see that we have 4 or 3 and the access is forbidden because that 10 00:00:46,290 --> 00:00:47,290 is the error message. 11 00:00:47,550 --> 00:00:53,220 So we're going to have to head our back to strategy and then we're going to look for roles and permissions 12 00:00:53,570 --> 00:00:58,200 and please keep in mind that each and every time you're going to create a new content type you're going 13 00:00:58,200 --> 00:00:59,730 to have to set these permissions. 14 00:00:59,770 --> 00:01:03,070 So it's not like just because I'm gonna set permissions for the product. 15 00:01:03,240 --> 00:01:08,580 Then once we create orders we already going to have the permissions in place now for each and every 16 00:01:08,580 --> 00:01:12,460 content that you're gonna have to set up permissions and we have two options. 17 00:01:12,510 --> 00:01:18,840 We have authenticated users so essentially users that have logged in or we have the public one. 18 00:01:19,080 --> 00:01:23,960 And if we had over back to our application Who do you think should be able to see the product. 19 00:01:23,970 --> 00:01:26,840 I don't think you need to log in in order to see the product correct. 20 00:01:26,850 --> 00:01:29,100 I think everyone should be able to see the product. 21 00:01:29,130 --> 00:01:34,950 So in this case we're looking for the public user so instead of authenticated we're looking for the 22 00:01:34,980 --> 00:01:36,420 public permissions. 23 00:01:36,420 --> 00:01:40,000 And that means that anyone can do something with that content. 24 00:01:40,050 --> 00:01:41,580 Now what is that something. 25 00:01:41,610 --> 00:01:45,530 And we for example have an option for creating the leading updating. 26 00:01:45,690 --> 00:01:52,620 But do you want the public to create a new product or in fact delete the new product as well as update. 27 00:01:52,620 --> 00:01:53,300 Probably not. 28 00:01:53,820 --> 00:02:00,210 So the options we're looking for are fined as well as find one and the moment I click on fine check 29 00:02:00,210 --> 00:02:00,690 it out. 30 00:02:00,870 --> 00:02:07,170 Now we can have a get request where again we have domain name whether that's local host or whether that's 31 00:02:07,170 --> 00:02:11,670 going to be once it's already in production and then forward slash product. 32 00:02:11,670 --> 00:02:16,720 So this is where we're gonna get all our product and also we have an option for finding one. 33 00:02:16,800 --> 00:02:21,930 And if you're looking at our application you might argue well there's really no point of finding one 34 00:02:22,220 --> 00:02:28,260 because it's not like we're setting up a separate HDTV request from the single product page and you're 35 00:02:28,260 --> 00:02:33,630 correct because we're getting our single product already from the context but since I would still want 36 00:02:33,630 --> 00:02:35,310 to show you how we can get one. 37 00:02:35,340 --> 00:02:42,270 So if we go for find one and then instead of just product we have product and then the entity and then 38 00:02:42,270 --> 00:02:43,660 we're gonna save it. 39 00:02:43,860 --> 00:02:48,450 And now if I'm going to head over back to the local host products and if we're going to refresh check 40 00:02:48,450 --> 00:02:50,560 it out now we have our product. 41 00:02:50,700 --> 00:02:56,400 And if let's say I would want to get more info about the product number one I would just add forward 42 00:02:56,400 --> 00:02:58,890 slash and then the idea is one. 43 00:02:58,920 --> 00:03:03,720 So I'm just getting the info about that one specific product and you're going to see that the info is 44 00:03:03,720 --> 00:03:05,410 exactly the same. 45 00:03:05,430 --> 00:03:10,870 So exactly the same to you earlier I provided already the one that I set up as my own API. 46 00:03:11,220 --> 00:03:14,380 However the difference is going to be the image your url. 47 00:03:14,490 --> 00:03:17,890 So that's something we're going to have to fix in and next videos. 48 00:03:17,910 --> 00:03:20,820 We're currently when we're going to fetch our product. 49 00:03:20,970 --> 00:03:23,220 In fact we're not going to display the images.