IBM / FoodTrackerBackend

This tutorial teaches how to create a Kitura Swift backend for the FoodTracker iOS app tutorial from Apple. This project contains a version of the tutorial code that has been updated to use Codable rather than NSCoder.
108 stars 38 forks source link

Error #26

Open anm8tr opened 6 years ago

anm8tr commented 6 years ago

On Section #1, Deleting Meals from the Meal Server, it instructs you to add the following code:

func deleteHandler(id: String, completion: (RequestError?) -> Void ) { print("Deleting (id) from mealStore") mealStore[id] = nil completion(nil) }

In the documentation for creating the Food Server backend it states to delete all references to "mealStore" when adding the postgresql database. So there is an obvious error when trying to run this script following that tutorial. The whole idea was to get the server to store and delete entries from the database. I have yet to get that part to work properly despite many repeat attempts, assuming I might have missed something somewhere.

Thx for any feedback.

Andrew-Lees11 commented 6 years ago

@anm8tr Thanks for pointing that out. The original foodtracker backend didn't remove the mealstore but this was changed with the ORM. This means "Deleting Meals from the Meal Server" needs to be updated and we will look at that now.

Andrew-Lees11 commented 6 years ago

@anm8tr A pull request fixing this issue and the rest of the next steps has been created.