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

Function formToInput

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

Source from the content-addressed store, hash-verified

1148 };
1149
1150const formToInput = (form: SquadForm): SharedSquadInput => ({
1151 description: form.description,
1152 handle: form.handle,
1153 name: form.name,
1154 image: form.file,
1155 headerImage: form.header,
1156 memberPostingRole: form.memberPostingRole,
1157 memberInviteRole: form.memberInviteRole,
1158 categoryId: form.categoryId,
1159 moderationRequired: form.moderationRequired,
1160 postingMinReputation: form.postingMinReputation ?? null,
1161 isPrivate: form.status === PrivacyOption.Private,
1162});
1163
1164export async function createSquad(form: SquadForm): Promise<Squad> {
1165 const { description, ...inputData } = formToInput(form);

Callers 2

createSquadFunction · 0.85
editSquadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected