REFACTOR: minor changes to api-keys-new (PR #14435)

  • moves loading scopes to controller
  • avoids declaring array
  • simplify code

GitHub