chore: split axios request options into platform (#3927)

Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
Akash K
2024-03-22 13:42:41 +05:30
committed by GitHub
parent c89c2a5f5c
commit d19807b212
3 changed files with 21 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ import { TeamRequest } from "./TeamRequest"
import { Service } from "dioc"
import axios from "axios"
import { Ref } from "vue"
import { platform } from "~/platform"
type CollectionSearchMeta = {
isSearchResult?: boolean
@@ -199,6 +200,8 @@ export class TeamSearchService extends Service {
this.searchResultsRequests = {}
this.expandedCollections.value = []
const axiosPlatformConfig = platform.auth.axiosPlatformConfig?.() ?? {}
try {
const searchResponse = await axios.get(
`${
@@ -206,9 +209,7 @@ export class TeamSearchService extends Service {
}/team-collection/search/${teamID}?searchQuery=${encodeURIComponent(
query
)}`,
{
withCredentials: true,
}
axiosPlatformConfig
)
if (searchResponse.status !== 200) {