Convert destroy operations to return promises.

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

david
Review Board
master
reviewboard

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
Convert destroy operations to return promises.
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. Think you can use .and.resolveTo().

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

    Can/should we use the callback deprecation pattern here?

    1. These are updated in a later change.

  4. 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: Closed (submitted)

Change Summary:

Pushed to master (d12cc4e)
Loading...