(item, fields)
| 2 | import { searchTussAdvanced } from '@/services/tuss'; |
| 3 | |
| 4 | function project(item, fields) { |
| 5 | if (!Array.isArray(fields) || fields.length === 0) return item; |
| 6 | return fields.reduce( |
| 7 | (acc, key) => |
| 8 | item[key] === undefined ? acc : { ...acc, [key]: item[key] }, |
| 9 | {} |
| 10 | ); |
| 11 | } |
| 12 | |
| 13 | async function TussSearchAdvanced(request, response) { |
| 14 | const { q, name, tuss, match, sort, order, limit, offset, fields } = |
no outgoing calls
no test coverage detected