(cloudId: string)
| 100 | |
| 101 | transformResponse: async (response: Response, params?: JiraListProjectsParams) => { |
| 102 | const fetchProjects = async (cloudId: string) => { |
| 103 | const projectsResponse = await fetch(buildSearchUrl(cloudId, params!), { |
| 104 | method: 'GET', |
| 105 | headers: { |
| 106 | Accept: 'application/json', |
| 107 | Authorization: `Bearer ${params!.accessToken}`, |
| 108 | }, |
| 109 | }) |
| 110 | |
| 111 | if (!projectsResponse.ok) { |
| 112 | const errorText = await projectsResponse.text() |
| 113 | throw new Error( |
| 114 | parseAtlassianErrorMessage( |
| 115 | projectsResponse.status, |
| 116 | projectsResponse.statusText, |
| 117 | errorText |
| 118 | ) |
| 119 | ) |
| 120 | } |
| 121 | |
| 122 | return projectsResponse.json() |
| 123 | } |
| 124 | |
| 125 | let data: any |
| 126 |
no test coverage detected