mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
[workflow-migration] Fixed the Loop node not saving issue. (#13229)
* feat: implement workflow query validation guard and add static data source retrieval method * chore: update subproject commits for frontend and server * refactor: remove ValidateWorkflowQuerySourceGuard as part of code cleanup * fix: correct data_source_id property assignment in createWorkflowQuery function * fix: update endpoint for createWorkflowQuery to use correct URL for workflow nodes
This commit is contained in:
parent
2447a55e22
commit
5599a8caa2
4 changed files with 29 additions and 3 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit b8bb0fdd287f4cf52d044a02be8b8d4777abfbe6
|
||||
Subproject commit 2eeda8ae9a78ad82cd996ce4307f257268036cb7
|
||||
|
|
@ -11,6 +11,7 @@ export const dataqueryService = {
|
|||
changeQueryDataSource,
|
||||
updateStatus,
|
||||
bulkUpdateQueryOptions,
|
||||
createWorkflowQuery,
|
||||
};
|
||||
|
||||
function getAll(appVersionId) {
|
||||
|
|
@ -36,6 +37,23 @@ function create(app_id, app_version_id, name, kind, options, data_source_id, plu
|
|||
).then(handleResponse);
|
||||
}
|
||||
|
||||
function createWorkflowQuery(app_id, app_version_id, name, kind, options, data_source_id, plugin_id) {
|
||||
const body = {
|
||||
app_id,
|
||||
app_version_id,
|
||||
name,
|
||||
kind,
|
||||
options,
|
||||
data_source_id,
|
||||
plugin_id,
|
||||
};
|
||||
|
||||
const requestOptions = { method: 'POST', headers: authHeader(), credentials: 'include', body: JSON.stringify(body) };
|
||||
return fetch(`${config.apiUrl}/data-queries/workflow-node/versions/${app_version_id}`, requestOptions).then(
|
||||
handleResponse
|
||||
);
|
||||
}
|
||||
|
||||
function update(id, versionId, name, options, dataSourceId) {
|
||||
const body = {
|
||||
options,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d5eb650e9c5dc62c4a3db1a29f6216315871f195
|
||||
Subproject commit 5edf1e4b0851cec1d06a14f9984c681e53ebbe77
|
||||
|
|
@ -5,7 +5,7 @@ import { UserPermissions } from '@modules/ability/types';
|
|||
import { MODULES } from '@modules/app/constants/modules';
|
||||
import { dbTransactionWrap } from '@helpers/database.helper';
|
||||
import { DataSourceScopes, DataSourceTypes } from './constants';
|
||||
import { GetQueryVariables } from './types';
|
||||
import { DefaultDataSourceKind, GetQueryVariables } from './types';
|
||||
import { decode } from 'js-base64';
|
||||
|
||||
@Injectable()
|
||||
|
|
@ -162,6 +162,14 @@ export class DataSourcesRepository extends Repository<DataSource> {
|
|||
});
|
||||
}
|
||||
|
||||
async getStaticDataSourceByKind(organizationId: string, kind: DefaultDataSourceKind, manager?: EntityManager): Promise<DataSource> {
|
||||
return dbTransactionWrap((manager: EntityManager) => {
|
||||
return manager.findOneOrFail(DataSource, {
|
||||
where: { organizationId, type: DataSourceTypes.STATIC, kind },
|
||||
});
|
||||
}, manager || this.manager);
|
||||
}
|
||||
|
||||
findByQuery(dataQueryId: string, organizationId: string, dataSourceId?: string, manager?: EntityManager) {
|
||||
return dbTransactionWrap((manager: EntityManager) => {
|
||||
return manager.findOne(DataSource, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue