input: Write a function to create an API using Flask that takes a list or array of integers and returns their minimum and maximum values.
  
  from flask import Flask, request
  
  app = Flask(__name__)
  
  @app.route('/minmax', methods=['POST'])
  def minmax():
   data = request.get_json()
   nums = data['nums']
   minVal = min(nums)
   maxVal = max(nums)
   return {'min': minVal, 'max': maxVal}
  
  if __name__ == '__main__':
   app.run(debug=True)
  
  ### Test Cases:
  #### Input:
  - `{"nums": [12, 4, 9, 24, -5]}`
  #### Expected Output:
  - `{'min': -5, 'max': 24}`
output: def minmax():
   data = request.get_json()
   nums = data['nums']
   minVal = min(nums)
   maxVal = max(nums)
   return {'min': minVal, 'max': maxVal}