( authToken: string, organization: string, project_name: string, url: string )
| 61 | } |
| 62 | |
| 63 | export async function deleteProject( |
| 64 | authToken: string, |
| 65 | organization: string, |
| 66 | project_name: string, |
| 67 | url: string |
| 68 | ): Promise<string> { |
| 69 | const key = `${organization}/${project_name.toLowerCase()}`; |
| 70 | try { |
| 71 | await axios({ |
| 72 | headers: { |
| 73 | Authorization: `Bearer ${authToken}`, |
| 74 | }, |
| 75 | method: 'delete', |
| 76 | url: `subqueries/${key}`, |
| 77 | baseURL: url, |
| 78 | }); |
| 79 | return `${key}`; |
| 80 | } catch (e) { |
| 81 | throw errorHandle(e, 'Failed to delete project:'); |
| 82 | } |
| 83 | } |
no test coverage detected