Update statusRole parameter name

This commit is contained in:
Michael Rogers 2023-06-20 17:52:40 -05:00
parent 71d8ffdd80
commit 76faabf471

View File

@ -114,7 +114,7 @@ export default class ExampleUserProvider extends EventEmitter {
} }
getStatusRoleForCurrentUser(role) { getStatusRoleForCurrentUser(role) {
const matchedRole = this.statusRoleValues.find(x => x.role === role); const matchedRole = this.statusRoleValues.find(statusRole => statusRole.role === role);
return Promise.resolve(matchedRole?.status); return Promise.resolve(matchedRole?.status);
} }
@ -124,7 +124,7 @@ export default class ExampleUserProvider extends EventEmitter {
} }
getStatusForRole(role) { getStatusForRole(role) {
const statusForRole = this.statusRoleValues.find(x => x.role === role); const statusForRole = this.statusRoleValues.find(statusRole => statusRole.role === role);
return Promise.resolve(statusForRole?.status); return Promise.resolve(statusForRole?.status);
} }
@ -137,7 +137,7 @@ export default class ExampleUserProvider extends EventEmitter {
setStatusForRole(role, status) { setStatusForRole(role, status) {
status.timestamp = Date.now(); status.timestamp = Date.now();
const matchingIndex = this.statusRoleValues.findIndex(x => x.role === role); const matchingIndex = this.statusRoleValues.findIndex(statusRole => statusRole.role === role);
this.statusRoleValues[matchingIndex].status = status; this.statusRoleValues[matchingIndex].status = status;
this.emit('statusChange', { this.emit('statusChange', {
role, role,