Most functions (as appropriate) were refactored to use the async/await syntax (rather than callbacks), more consistent whitespacing, simplified logic flow, and updated a few instances of deprecated functions (res.json(status, obj) --> res.status(status).json(obj)).
Notably, the publicStats and destroy functions have not been refactored. Alex S. mentioned that the destroy function has some blatant security flaw and should be looked at.
In using "npm test", all tests passed except for 1 pending, which is pending because expiresInMinutes and expiresInSeconds are deprecated, although I'm not sure how I can fix this on my end. This may have stopped the rest of the user controller from even being tested.
Addresses #808.
Most functions (as appropriate) were refactored to use the async/await syntax (rather than callbacks), more consistent whitespacing, simplified logic flow, and updated a few instances of deprecated functions (res.json(status, obj) --> res.status(status).json(obj)).
Notably, the publicStats and destroy functions have not been refactored. Alex S. mentioned that the destroy function has some blatant security flaw and should be looked at.
In using "npm test", all tests passed except for 1 pending, which is pending because expiresInMinutes and expiresInSeconds are deprecated, although I'm not sure how I can fix this on my end. This may have stopped the rest of the user controller from even being tested.