angular: api: insert todo after confirming success