今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Challenge: Extending the Orders app
(bright music) - [Instructor] We now understand how Go routines and channels work as we have built out the Orders App. It's now time to get some hands-on experience with the code we have built so far. We will be rounding off the functionality of the Orders App with one new endpoint for reversing orders. I have gone ahead and implemented the reversal handler for us. It calls out to this request reversal method on line 148. You should use this method to implement all your internal logic for requesting reversals. Just like during order creation, this operation uses two statuses, reversal requested and reversed. I have added these two statuses on lines 15 and 16 in the orders model. You should use these statuses during reversal implementation. Finally, stats processing should take into account order reversals as well. You should implement the changes required in this if statement on line 81. So here's your challenge.…