mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
refactor(schema): simplify validation and OpenAPI generation (#2709)
This commit is contained in:
1 parent
4bc5593f9f
commit
de1fd95a99
510 files changed
+29494
-36131
No files matched your search
@@ -207,7 +207,7 @@ const EmbedDebuggerTab: React.FC = observer(() => {
|
||||
() => (previewEmbeds ? createPreviewMessage(submittedUrl, previewEmbeds) : null),
|
||||
[previewEmbeds, submittedUrl],
|
||||
);
|
||||
const handleSubmit = async (event: React.FormEvent<HTMLFormElement>) => {
|
||||
const handleSubmit = async (event: React.SubmitEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
if (!trimmedUrl || isSubmitting) return;
|
||||
setIsSubmitting(true);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import type {TransientUploadFieldValue} from '@app/lib/forms/TransientUploadFields';
|
||||
import {assign, getInitialSnapshot, type SnapshotFrom, setup, transition} from 'xstate';
|
||||
import {assign, initialTransition, type SnapshotFrom, setup, transition} from 'xstate';
|
||||
|
||||
export type ProfileAssetMode = 'inherit' | 'custom' | 'unset';
|
||||
|
||||
@@ -244,7 +244,7 @@ export const profileAssetCustomizationStateMachine = setup({
|
||||
export type ProfileAssetCustomizationSnapshot = SnapshotFrom<typeof profileAssetCustomizationStateMachine>;
|
||||
|
||||
export function createProfileAssetCustomizationSnapshot(): ProfileAssetCustomizationSnapshot {
|
||||
return getInitialSnapshot(profileAssetCustomizationStateMachine);
|
||||
return initialTransition(profileAssetCustomizationStateMachine)[0];
|
||||
}
|
||||
|
||||
export function transitionProfileAssetCustomizationSnapshot(
|
||||
|
||||
Reference in new issue
Block a user