implementing udp server

This commit is contained in:
daniel muniz
2024-06-06 17:25:17 -03:00
parent 48cdf694b5
commit 13f6aa8ecb
5 changed files with 71 additions and 11 deletions

View File

@@ -4,8 +4,10 @@ class CategoryConverterUseCase {
this.categoriesMapping = categoriesMapping
}
execute() {
execute(category) {
const entry = this.categoriesMapping.find(item => item.id === category)
return entry ? entry.related[0].split(', ').map(str => str.trim()) : null;
}
}