huridocs/uwazi

View on GitHub
app/api/utils/sanitizeResponse.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
const sanitizeResponse = response => {
  if (response.rows) {
    response.rows = response.rows.map(row => row.value);
  }

  return response;
};

export default sanitizeResponse;