Skip to content

BCRS Shared Components: pass Axios "get" and "put" functions to Staff Comments instead of Axios instance #29861

Closed

Description

@severinbeauvais

... so that the app (not the component) can manage the Axios instance and request headers. Currently the Axios instance passed in requires a specific base URL and request headers.

  • update StaffComments
  • publish as a breaking change (ie, increment major version)
  • update Business Dashboard UI to use updated component
  • update Business Create UI to use updated component
  • confirm that Filings UI and Edit UI don't use the component, otherwise update those, too

IMPACT: Due to the way this was originally coded, the default axios instance that is passed to the StaffComments component must be configured with a base URL and the request headers (including X-Apikey) for the Business API. This is a special case (which makes the code a bit fragile to changes) and may limit future changes to networking with multiple APIs. However, this is all currently working correctly, and specifically, the StaffComments component talks to the correct API. Eg, in Dev: https://test.api.connect.gov.bc.ca/business-dev/api/v2/businesses/FM1169766/comments

NOTE: An issue was found in another component while passing just the service functions: they could not read the service getter that provided the URL. This may impact the solution to THIS ticket.

Activity

  1. added
    Entities Team
    on Jul 30, 2025
  2. changed the title [-]BCRS Shared Components: pass Axios get and put to Staff Comments instead of Axios instance[/-] [+]BCRS Shared Components: pass Axios "get" and "put" functions to Staff Comments instead of Axios instance[/+] on Aug 11, 2025
  3. severinbeauvais commented on Oct 27, 2025

    @severinbeauvais
    CollaboratorAuthor

    Analyzed and reviewed with Olga Oct 24, 2025:
    "Won't be needed when UIs are rewritten in Nuxt." => do long term or never

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities Teamtechdebt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions