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

Function formToInput

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

Source from the content-addressed store, hash-verified

1175 };
1176
1177const 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
1191export async function createSquad(form: SquadForm): Promise<Squad> {
1192 const { description, ...inputData } = formToInput(form);

Callers 2

createSquadFunction · 0.85
editSquadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected