For that, you’ll need to make changes in
I made a special factory, called ‘storage’, look from line 1025 to 1085.
I specially made get, put and delete functions to be more simply! Just change these functions and return promises, like $.get() or $.post(), you know!
On GET request you can return Email which contain ID, and on POST this ID will be in email parameter.