Browse Source
Feature/refactor export service (#5276)
* Refactor export service
pull/5307/head
Thomas Kaul
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
3 deletions
-
apps/api/src/app/export/export.service.ts
|
@ -141,15 +141,16 @@ export class ExportService { |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
const tags = (await this.tagService.getTagsForUser(userId)) |
|
|
const tags = (await this.tagService.getTagsForUser(userId)) |
|
|
.filter( |
|
|
.filter(({ id, isUsed }) => { |
|
|
({ id, isUsed }) => |
|
|
return ( |
|
|
isUsed && |
|
|
isUsed && |
|
|
activities.some((activity) => { |
|
|
activities.some((activity) => { |
|
|
return activity.tags.some(({ id: tagId }) => { |
|
|
return activity.tags.some(({ id: tagId }) => { |
|
|
return tagId === id; |
|
|
return tagId === id; |
|
|
}); |
|
|
}); |
|
|
}) |
|
|
}) |
|
|
) |
|
|
); |
|
|
|
|
|
}) |
|
|
.map(({ id, name }) => { |
|
|
.map(({ id, name }) => { |
|
|
return { |
|
|
return { |
|
|
id, |
|
|
id, |
|
|