Skip to content

Commit a51e954

Browse files
committed
refactor: uploadCIPiplineFile service - types update
1 parent 0508b98 commit a51e954

File tree

1 file changed

+4
-8
lines changed
  • src/Pages/Applications/DevtronApps/Details/CIPipeline

1 file changed

+4
-8
lines changed

src/Pages/Applications/DevtronApps/Details/CIPipeline/services.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { MutableRefObject } from 'react'
2-
31
import { ROUTES } from '@Common/Constants'
42
import { getIsRequestAborted, post } from '@Common/Api'
53
import { getUrlWithSearchParams, showError } from '@Common/Helper'
6-
import { UploadFileDTO } from '@Shared/types'
4+
import { UploadFileDTO, UploadFileProps } from '@Shared/types'
5+
import { APIOptions } from '@Common/Types'
76

87
export const uploadCIPipelineFile = async ({
98
file,
@@ -14,14 +13,11 @@ export const uploadCIPipelineFile = async ({
1413
maxUploadSize,
1514
abortControllerRef,
1615
}: {
17-
file: File[]
1816
appId: number
1917
ciPipelineId: number
2018
envId?: number
21-
allowedExtensions?: string[]
22-
maxUploadSize?: number
23-
abortControllerRef?: MutableRefObject<AbortController>
24-
}): Promise<UploadFileDTO> => {
19+
} & UploadFileProps &
20+
Pick<APIOptions, 'abortControllerRef'>): Promise<UploadFileDTO> => {
2521
const formData = new FormData()
2622
formData.append('file', file[0])
2723

0 commit comments

Comments
 (0)