Convert destroy operations to return promises.

Review Request #11641 — Created June 1, 2021 and submitted

Information

Review Board
master

Reviewers

This change updates the destroy operations for various objects to use
promises and async/await, rather than relying on callbacks.

  • Ran js-tests.
  • Tested deleting comments, group memberships, and other affected
    objects.
Summary ID
Convert destroy operations to return promises.
This change updates the destroy operations for various objects to use promises and async/await, rather than relying on callbacks. Testing Done: - Ran js-tests. - Tested deleting comments, group memberships, and other affected objects.
6b593ed2b5f2f94f476483ee184e52009b788c0f
Description From Last Updated

Think you can use .and.resolveTo().

chipx86chipx86

Can/should we use the callback deprecation pattern here?

chipx86chipx86

Can we format this with .destroy() on the next line? this.model.get('reviewRequest') .destroy({ ... }) .then(...);

chipx86chipx86
david
david
chipx86
  1. 
      
  2. Show all issues

    Think you can use .and.resolveTo().

  3. reviewboard/static/rb/js/resources/models/reviewGroupModel.es6.js (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Can/should we use the callback deprecation pattern here?

    1. These are updated in a later change.

  4. Show all issues

    Can we format this with .destroy() on the next line?

    this.model.get('reviewRequest')
        .destroy({
            ...
        })
        .then(...);
    
  5. 
      
david
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (d12cc4e)