(form: SquadForm)
| 1175 | }; |
| 1176 | |
| 1177 | const formToInput = (form: SquadForm): SharedSquadInput => ({ |
| 1178 | description: form.description, |
| 1179 | handle: form.handle, |
| 1180 | name: form.name, |
| 1181 | image: form.file, |
| 1182 | headerImage: form.header, |
| 1183 | memberPostingRole: form.memberPostingRole, |
| 1184 | memberInviteRole: form.memberInviteRole, |
| 1185 | categoryId: form.categoryId, |
| 1186 | moderationRequired: form.moderationRequired, |
| 1187 | postingMinReputation: form.postingMinReputation ?? null, |
| 1188 | isPrivate: form.status === PrivacyOption.Private, |
| 1189 | }); |
| 1190 | |
| 1191 | export async function createSquad(form: SquadForm): Promise<Squad> { |
| 1192 | const { description, ...inputData } = formToInput(form); |
no outgoing calls
no test coverage detected