MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / submit

Function submit

packages/react/src/plugins/secret-form.tsx:165–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

163 state.status.kind !== "submitting";
164
165 const submit = async () => {
166 if (!canSubmit) return;
167 setState((s) => ({ ...s, status: { kind: "submitting" } }));
168 const exit = await doCreate({
169 payload: {
170 owner,
171 name: ConnectionName.make(id.trim()),
172 integration,
173 template,
174 identityLabel: displayName || id.trim(),
175 value: state.value.trim(),
176 },
177 reactivityKeys: connectionWriteKeys,
178 });
179 if (Exit.isFailure(exit)) {
180 setState((s) => ({
181 ...s,
182 status: {
183 kind: "error",
184 message: credentialSaveErrorMessage(exit),
185 },
186 }));
187 return;
188 }
189 onCreated(id.trim());
190 };
191
192 const value: SecretFormContextValue = {
193 state,

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected