Fixed check_api_key decorator to properly unpack incoming JSON request