MCPcopy Index your code
hub / github.com/AnswerOverflow/AnswerOverflow / addDomainToVercel

Function addDomainToVercel

packages/api/src/utils/domains.ts:67–79  ·  view source on GitHub ↗
(domain: string)

Source from the content-addressed store, hash-verified

65}
66
67export 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
81export const removeDomainFromVercelProject = async (domain: string) => {
82 return await fetch(

Callers 1

operationFunction · 0.90

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected