mirror of
https://fast.feibisi.com/https://github.com/lubusIN/visual-blueprint-builder.git
synced 2025-10-03 04:01:24 +08:00
use schema from blueprint for fetch only
This commit is contained in:
parent
939ed2c1c2
commit
93750f33f3
2 changed files with 4 additions and 3 deletions
|
@ -11,7 +11,8 @@ export const PLAYGROUND_BUILDER_BASE = "https://href.li/?https://playground.word
|
|||
/**
|
||||
* Playground blueprint schema url
|
||||
*/
|
||||
export const PLAYGROUND_BLUEPRINT_SCHEMA_URL = "https://raw.githubusercontent.com/WordPress/wordpress-playground/refs/heads/trunk/packages/playground/blueprints/public/blueprint-schema.json";
|
||||
export const PLAYGROUND_BLUEPRINT_SCHEMA_URL = "https://playground.wordpress.net/blueprint-schema.json";
|
||||
export const PLAYGROUND_BLUEPRINT_SCHEMA_URL_FETCH = "https://raw.githubusercontent.com/WordPress/wordpress-playground/refs/heads/trunk/packages/playground/blueprints/public/blueprint-schema.json";
|
||||
|
||||
/**
|
||||
* PHP versions.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import { __ } from '@wordpress/i18n';
|
||||
import { createBlock } from "@wordpress/blocks";
|
||||
import { dispatch, useSelect, useDispatch } from '@wordpress/data';
|
||||
import { PLAYGROUND_BLUEPRINT_SCHEMA_URL } from './constant';
|
||||
import { PLAYGROUND_BLUEPRINT_SCHEMA_URL, PLAYGROUND_BLUEPRINT_SCHEMA_URL_FETCH } from './constant';
|
||||
import { useCallback } from '@wordpress/element';
|
||||
|
||||
/**
|
||||
|
@ -88,7 +88,7 @@ const updateDeprecatedFields = (jsonData) => {
|
|||
*/
|
||||
const validateAgainstSchema = async (data, createNotice) => {
|
||||
try {
|
||||
const response = await fetch(PLAYGROUND_BLUEPRINT_SCHEMA_URL);
|
||||
const response = await fetch(PLAYGROUND_BLUEPRINT_SCHEMA_URL_FETCH);
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to fetch schema.');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue