input: Write a function to create an API using flask and python which takes a list or array of integers and returns their minimum and maximum values. If the list is empty, the function should return `{'min': None, 'max': None}`.
  assert minmax([12, 4, 9, 24, -5])=={'min': -5, 'max': 24}
  assert minmax([5])=={'min': 5, 'max': 5}
  assert minmax([])=={'min': None, 'max': None}
output: def minmax(arr):
      if not arr:
          return {'min': None, 'max': None}
      return {'min': min(arr), 'max': max(arr)}