Update the remaining commands to use the hasTargetUser() helper function, making the code more DRY.
Is your feature request related to a problem? Please describe.
The current target user is repeated multiple times through the code, it would be more efficient to have this handled in a single place.
Proposed Solution
This one is a bit more difficult to implement than #211 as those were just updating a function call and removing the old code, however most of the remaining commands use a data array and return then contents of that instead:
if (!data.toBan) {
data.err = 'Please provide a user to ban.';
return data;
}
One option would be to completely remove this and bring it more inline with newer commands but that is potentially a lot of work to make a small end change in efficiency.
Acceptance Criteria
Please list the requirements the implementation of this feature should meet.
Purpose
Update the remaining commands to use the
hasTargetUser()
helper function, making the code more DRY.Is your feature request related to a problem? Please describe.
The current target user is repeated multiple times through the code, it would be more efficient to have this handled in a single place.
Proposed Solution
This one is a bit more difficult to implement than #211 as those were just updating a function call and removing the old code, however most of the remaining commands use a data array and return then contents of that instead:
One option would be to completely remove this and bring it more inline with newer commands but that is potentially a lot of work to make a small end change in efficiency.
Acceptance Criteria
Please list the requirements the implementation of this feature should meet.