Skip to content

Commit

Permalink
Dealias all found *async* methods
Browse files Browse the repository at this point in the history
* Their method renaming over the years with an alias that might disappear... so use native and indexed.

Applies to OpenUserJS#72
  • Loading branch information
Martii committed May 5, 2017
1 parent 361a21e commit 8d0ad7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions controllers/flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ exports.getFlaggedListForContent = function (aModelName, aOptions, aCallback) {
var content = aModelName.toLowerCase();
var contentList = aOptions[content + 'List'] || [aOptions[content]];

async.forEachOf(contentList, function (aContent, aContentKey, aEachOuterCallback) {
async.eachOf(contentList, function (aContent, aContentKey, aEachOuterCallback) {

// NOTE: Directly use indexed parent identifier allowing set of the dynamic, virtual, field
// So basically do not use `aContent` anywhere in this function
Expand Down Expand Up @@ -167,7 +167,7 @@ exports.getFlaggedListForContent = function (aModelName, aOptions, aCallback) {

aOptions.hasFlagged = true;

async.forEachOfSeries(aFlagList, function (aFlag, aFlagKey, aEachInnerCallback) {
async.eachOfSeries(aFlagList, function (aFlag, aFlagKey, aEachInnerCallback) {
User.findOne({ _id: aFlag._userId }, function (aErr, aUser) {
if (aErr || !aUser) {
// Notify in stdout
Expand Down
2 changes: 1 addition & 1 deletion controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ exports.userScriptListPage = function (aReq, aRes, aNext) {
var scriptKeyMax = scriptList.length - 1;

if (scriptKeyMax >= 0 && options.isYou) {
async.forEachOfSeries(options.scriptList, function (aScript, aScriptKey, aEachCallback) {
async.eachOfSeries(options.scriptList, function (aScript, aScriptKey, aEachCallback) {
var script = modelParser.parseScript(aScript);

// Find if script has any open issues
Expand Down

0 comments on commit 8d0ad7a

Please sign in to comment.