import * as fetch from 'isomorphic-fetch'

export default async (endpoint: string): Promise<Record<string, unknown> | Record<string, unknown>[]> => {
  const response = await fetch(`https://data.police.uk/api${endpoint}`)
  return response.json()
}

import * as fetch from 'isomorphic-fetch'

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default async (endpoint: string): Promise<any> => {
  const response = await fetch(`https://data.police.uk/api${endpoint}`)
  return response.json()
}

Revert "fix fetch data result type"
Revert "fix fetch data result type"

This reverts commit 6a6e2dd3093d69e932a1abf793c79a53f7d6c69a.
