(form: SquadForm)
| 1189 | }); |
| 1190 | |
| 1191 | export async function createSquad(form: SquadForm): Promise<Squad> { |
| 1192 | const { description, ...inputData } = formToInput(form); |
| 1193 | // The API rejects an empty description, so a squad created without one |
| 1194 | // (the Startups company step asks only for a name) leaves it out |
| 1195 | const data = await gqlClient.request(CREATE_SQUAD_MUTATION, { |
| 1196 | ...inputData, |
| 1197 | ...(description ? { description } : {}), |
| 1198 | ...(form.company && { company: true }), |
| 1199 | ...(form.company && form.website && { website: form.website }), |
| 1200 | ...(form.company && getAdClickIds()), |
| 1201 | }); |
| 1202 | |
| 1203 | return data.createSquad; |
| 1204 | } |
| 1205 | |
| 1206 | interface EditSquadMutation { |
| 1207 | id: string; |
nothing calls this directly
no test coverage detected