Editing a Single Photo

Editing photos

Now that the user can search and save photos, it’s time to add the final major component: editing a saved photo.

The first requirement is simple: get a single photo from the API. While it’s possible to reuse the getSavedPhotos method and just filter down to the requested ID, it’s more elegant to have a function just for this purpose, and adding a method won’t complicate things too much. Add a getSinglePhoto method to PhotosService:

Get hands-on with 1200+ tech skills courses.