| 65 | } |
| 66 | |
| 67 | export const addDomainToVercel = async (domain: string) => { |
| 68 | return await fetch( |
| 69 | `https://api.vercel.com/v9/projects/${sharedEnvs.PROJECT_ID_VERCEL}/domains?teamId=${sharedEnvs.TEAM_ID_VERCEL}`, |
| 70 | { |
| 71 | body: `{\n "name": "${domain}"\n}`, |
| 72 | headers: { |
| 73 | Authorization: `Bearer ${sharedEnvs.AUTH_BEARER_TOKEN_VERCEL}`, |
| 74 | 'Content-Type': 'application/json', |
| 75 | }, |
| 76 | method: 'POST', |
| 77 | }, |
| 78 | ).then((res) => res.json()); |
| 79 | }; |
| 80 | |
| 81 | export const removeDomainFromVercelProject = async (domain: string) => { |
| 82 | return await fetch( |