PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | js/components/ImportMenu/MigrateForm/WithMigrationData.tsx +3 -3 3.10.1 → 4.0.0-beta.2 View file →
@@ -55,9 +55,9 @@
55 55 if (!importer) {
56 56 throw new Error(__('Please select an importer.', 'code-snippets'))
57 57 }
58 58
59 - const response = await api.post<ImportResponse, ImportRequest>(`${REST_BASES.importPlugins}/${importer}/import`, request)
59 + const response = await api.post<ImportResponse, ImportRequest>(`${REST_BASES.import.plugins}/${importer}/import`, request)
60 60
61 61 if (1 > response.imported.length) {
62 62 throw new Error(__('No snippets were imported.', 'code-snippets'))
63 63 }
@@ -120,15 +120,15 @@
120 120 const snippetSelection = useSelection(snippets, snippet => snippet.table_data.id)
121 121
122 122 useEffect(() => {
123 123 fetchImporters(() => api
124 - .get<Record<string, Importer>>(REST_BASES.importPlugins)
124 + .get<Record<string, Importer>>(REST_BASES.import.plugins)
125 125 .then(response => Object.values(response)))
126 126 }, [api, fetchImporters])
127 127
128 128 useEffect(() => {
129 129 if (selectedImporter) {
130 - fetchSnippets(() => api.get<ImportableSnippet[]>(`${REST_BASES.importPlugins}/${selectedImporter}`))
130 + fetchSnippets(() => api.get<ImportableSnippet[]>(`${REST_BASES.import.plugins}/${selectedImporter}`))
131 131 }
132 132 }, [api, selectedImporter, fetchSnippets])
133 133
134 134 const importSnippets = () => {