mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 22:28:15 +00:00
remove comments
This commit is contained in:
@@ -51,18 +51,15 @@ export const useBitbucketConnectionListRepositories = (
|
|||||||
TBitbucketRepo[],
|
TBitbucketRepo[],
|
||||||
unknown,
|
unknown,
|
||||||
TBitbucketRepo[],
|
TBitbucketRepo[],
|
||||||
// The ReturnType here will be a supertype of the actual queryKey, which is acceptable
|
|
||||||
ReturnType<typeof bitbucketConnectionKeys.listRepos>
|
ReturnType<typeof bitbucketConnectionKeys.listRepos>
|
||||||
>,
|
>,
|
||||||
"queryKey" | "queryFn"
|
"queryKey" | "queryFn"
|
||||||
>
|
>
|
||||||
) => {
|
) => {
|
||||||
return useQuery({
|
return useQuery({
|
||||||
// Append workspaceSlug to the existing query key for unique caching
|
|
||||||
queryKey: bitbucketConnectionKeys.listRepos(connectionId, workspaceSlug),
|
queryKey: bitbucketConnectionKeys.listRepos(connectionId, workspaceSlug),
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const { data } = await apiRequest.get<TBitbucketConnectionListRepositoriesResponse>(
|
const { data } = await apiRequest.get<TBitbucketConnectionListRepositoriesResponse>(
|
||||||
// Include workspaceSlug in the API endpoint path
|
|
||||||
`/api/v1/app-connections/bitbucket/${connectionId}/repositories?workspaceSlug=${encodeURIComponent(workspaceSlug)}`
|
`/api/v1/app-connections/bitbucket/${connectionId}/repositories?workspaceSlug=${encodeURIComponent(workspaceSlug)}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user