(account, headers, project)
| 100 | } |
| 101 | |
| 102 | async function getPagesProject(account, headers, project) { |
| 103 | const { ok, json } = await cf( |
| 104 | `${CF_API}/accounts/${account}/pages/projects/${project}`, |
| 105 | headers, |
| 106 | ); |
| 107 | if (!ok) { |
| 108 | throw new Error( |
| 109 | `Get project ${project} failed: ${JSON.stringify(json)}`, |
| 110 | ); |
| 111 | } |
| 112 | return json.result; |
| 113 | } |
| 114 | |
| 115 | async function detachPagesDomain(account, headers, customDomain) { |
| 116 | const { ok, json } = await cf( |