MCPcopy Create free account
hub / github.com/dailydotdev/apps / formToInput

Function formToInput

packages/shared/src/graphql/squads.ts:1168–1180  ·  view source on GitHub ↗
(form: SquadForm)

Source from the content-addressed store, hash-verified

1166 };
1167
1168const formToInput = (form: SquadForm): SharedSquadInput => ({
1169 description: form.description,
1170 handle: form.handle,
1171 name: form.name,
1172 image: form.file,
1173 headerImage: form.header,
1174 memberPostingRole: form.memberPostingRole,
1175 memberInviteRole: form.memberInviteRole,
1176 categoryId: form.categoryId,
1177 moderationRequired: form.moderationRequired,
1178 postingMinReputation: form.postingMinReputation ?? null,
1179 isPrivate: form.status === PrivacyOption.Private,
1180});
1181
1182export async function createSquad(form: SquadForm): Promise<Squad> {
1183 const { description, ...inputData } = formToInput(form);

Callers 2

createSquadFunction · 0.85
editSquadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected