Excellent.
Once we add our products data we should be able to access them on local host 13 37 and then whatever
name we used for our content type which in our case was product.
But notice how I use the word should because by default you want you see by default strappy restrict
access to our data and we as admins need to set up permissions and just to show that I'm not making
this up.
I'm gonna open up a new browser tab and I'm going to look for local host on the euros thirteen thirty
seven and then instead of admin we're going to look for these products because again that was our content
type and we check it out and we can see that we have 4 or 3 and the access is forbidden because that
is the error message.
So we're going to have to head our back to strategy and then we're going to look for roles and permissions
and please keep in mind that each and every time you're going to create a new content type you're going
to have to set these permissions.
So it's not like just because I'm gonna set permissions for the product.
Then once we create orders we already going to have the permissions in place now for each and every
content that you're gonna have to set up permissions and we have two options.
We have authenticated users so essentially users that have logged in or we have the public one.
And if we had over back to our application Who do you think should be able to see the product.
I don't think you need to log in in order to see the product correct.
I think everyone should be able to see the product.
So in this case we're looking for the public user so instead of authenticated we're looking for the
public permissions.
And that means that anyone can do something with that content.
Now what is that something.
And we for example have an option for creating the leading updating.
But do you want the public to create a new product or in fact delete the new product as well as update.
Probably not.
So the options we're looking for are fined as well as find one and the moment I click on fine check
it out.
Now we can have a get request where again we have domain name whether that's local host or whether that's
going to be once it's already in production and then forward slash product.
So this is where we're gonna get all our product and also we have an option for finding one.
And if you're looking at our application you might argue well there's really no point of finding one
because it's not like we're setting up a separate HDTV request from the single product page and you're
correct because we're getting our single product already from the context but since I would still want
to show you how we can get one.
So if we go for find one and then instead of just product we have product and then the entity and then
we're gonna save it.
And now if I'm going to head over back to the local host products and if we're going to refresh check
it out now we have our product.
And if let's say I would want to get more info about the product number one I would just add forward
slash and then the idea is one.
So I'm just getting the info about that one specific product and you're going to see that the info is
exactly the same.
So exactly the same to you earlier I provided already the one that I set up as my own API.
However the difference is going to be the image your url.
So that's something we're going to have to fix in and next videos.
We're currently when we're going to fetch our product.
In fact we're not going to display the images.