| 139 | }; |
| 140 | |
| 141 | export const verifyDomain = async ( |
| 142 | domain: string, |
| 143 | ): Promise<DomainVerificationResponse> => { |
| 144 | // @ts-ignore |
| 145 | return await fetch( |
| 146 | `https://api.vercel.com/v9/projects/${sharedEnvs.PROJECT_ID_VERCEL}/domains/${domain}/verify?teamId=${sharedEnvs.TEAM_ID_VERCEL}`, |
| 147 | { |
| 148 | method: 'POST', |
| 149 | headers: { |
| 150 | Authorization: `Bearer ${sharedEnvs.AUTH_BEARER_TOKEN_VERCEL}`, |
| 151 | 'Content-Type': 'application/json', |
| 152 | }, |
| 153 | }, |
| 154 | ).then((res) => res.json()); |
| 155 | }; |
| 156 | |
| 157 | export const getSubdomain = (name: string, apexName: string) => { |
| 158 | if (name === apexName) return null; |