fix: update API code to use Axios instances (#13029)

* fix: update API code to use Axios instance

* docs: fix typo

* fix: update all global axios imports to use Coder instance

* fix: remove needless import

* fix: update import order

* refactor: rename coderAxiosInstance to axiosInstance

* docs: update variable reference in FE contributing docs
This commit is contained in:
Michael Smith
2024-04-24 17:01:23 +00:00
committed by GitHub
parent dd27a8a634
commit 3f21cb8a2f
8 changed files with 259 additions and 177 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ example below:
export const getAgentListeningPorts = async (
agentID: string,
): Promise<TypesGen.ListeningPortsResponse> => {
const response = await axios.get(
const response = await axiosInstance.get(
`/api/v2/workspaceagents/${agentID}/listening-ports`,
);
return response.data;