mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
fix lint
This commit is contained in:
parent
3521246cf1
commit
9e8c44a48b
@ -375,8 +375,7 @@ export class ContributionResolver {
|
||||
const result = new ContributionListResult(count, dbContributions)
|
||||
|
||||
const uniqueUserIds = new Set<number>()
|
||||
const addIfExist = (userId?: number | null) =>
|
||||
userId ? uniqueUserIds.add(userId) : null
|
||||
const addIfExist = (userId?: number | null) => (userId ? uniqueUserIds.add(userId) : null)
|
||||
|
||||
for (const contribution of result.contributionList) {
|
||||
addIfExist(contribution.confirmedBy)
|
||||
@ -386,8 +385,7 @@ export class ContributionResolver {
|
||||
addIfExist(contribution.deniedBy)
|
||||
}
|
||||
const users = await findUserNamesByIds(Array.from(uniqueUserIds))
|
||||
const getNameById = (userId?: number | null) =>
|
||||
userId ? users.get(userId) ?? null : null
|
||||
const getNameById = (userId?: number | null) => (userId ? (users.get(userId) ?? null) : null)
|
||||
|
||||
for (const contribution of result.contributionList) {
|
||||
contribution.confirmedByUserName = getNameById(contribution.confirmedBy)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user