Skip to content

Commit b27a68e

Browse files
committed
refactor: PR feedback - naming nits
1 parent b117ae9 commit b27a68e

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

lambdas/account-scoped/src/router.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { AccountScopedRoute, FunctionRoute, HttpRequest } from './httpTypes';
1919
import { validateRequestMethod } from './validation/method';
2020
import { isAccountSID } from './twilioTypes';
2121
import { handleTaskRouterEvent } from './taskrouter';
22-
import { updateWorkersSkills } from './taskrouter/updateWorkersSkills';
22+
import { handleUpdateWorkersSkills } from './taskrouter/updateWorkersSkills';
2323
import { handleGetProfileFlagsForIdentifier } from './hrm/getProfileFlagsForIdentifier';
2424
import { handleToggleSwitchboardQueue } from './hrm/toggleSwitchboardQueue';
2525
import {
@@ -119,7 +119,7 @@ const ROUTES: Record<string, FunctionRoute> = {
119119
},
120120
updateWorkersSkills: {
121121
requestPipeline: [validateFlexTokenRequest({ tokenMode: 'supervisor' })],
122-
handler: updateWorkersSkills,
122+
handler: handleUpdateWorkersSkills,
123123
},
124124
};
125125

lambdas/account-scoped/src/taskrouter/updateWorkersSkills.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const mergeAttributes = ({
6262
};
6363
};
6464

65-
const handleEnableOperation = ({
65+
const setSkillsEnable = ({
6666
attributes,
6767
enabledSkills,
6868
disabledSkills,
@@ -86,7 +86,7 @@ const handleEnableOperation = ({
8686
});
8787
};
8888

89-
const handleDisableOperation = ({
89+
const setSkillsDisable = ({
9090
attributes,
9191
enabledSkills,
9292
disabledSkills,
@@ -110,7 +110,7 @@ const handleDisableOperation = ({
110110
});
111111
};
112112

113-
const handleAssignOperation = ({
113+
const setSkillsAssign = ({
114114
attributes,
115115
enabledSkills,
116116
disabledSkills,
@@ -138,7 +138,7 @@ const handleAssignOperation = ({
138138
});
139139
};
140140

141-
const handleUnassignOperation = ({
141+
const setSkillsUnassign = ({
142142
attributes,
143143
enabledSkills,
144144
disabledSkills,
@@ -179,16 +179,16 @@ const updateSkillsOperation = ({
179179

180180
switch (operation) {
181181
case 'enable': {
182-
return handleEnableOperation(params);
182+
return setSkillsEnable(params);
183183
}
184184
case 'disable': {
185-
return handleDisableOperation(params);
185+
return setSkillsDisable(params);
186186
}
187187
case 'assign': {
188-
return handleAssignOperation(params);
188+
return setSkillsAssign(params);
189189
}
190190
case 'unassign': {
191-
return handleUnassignOperation(params);
191+
return setSkillsUnassign(params);
192192
}
193193
default:
194194
return attributes;
@@ -233,7 +233,10 @@ const updateWorkerSkills = async ({
233233
}
234234
};
235235

236-
export const updateWorkersSkills: AccountScopedHandler = async ({ body }, accountSid) => {
236+
export const handleUpdateWorkersSkills: AccountScopedHandler = async (
237+
{ body },
238+
accountSid,
239+
) => {
237240
try {
238241
const { workers, skills, operation } = body;
239242

0 commit comments

Comments
 (0)