mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): block workflow update on interim change (#4397)
* ⚡ Add `updatedAt` to store * ⚡ Set `updatedAt` in store * 👕 Update FE types * 👕 Update BE types * ⚡ Set `updatedAt` on workflow open * ⚡ Add endpoint check * ⚡ Add first update check * 🔥 Remove log * ⚡ Simplify check * ⚡ Make `makeWorkflow` more flexible * 🗃️ Make `updatedAt` default consistent * 🧪 Adjust tests checking for `updatedAt` * 🧪 Add tests for interim changes block * ✏️ Remove unneeded quotes * ⏪ Simplify without using `-1` * 👕 Simplify interfaces * 🐛 Fix calls to `setWorkflowUpdatedAt` setter * :track: Move update to API call * ⚡ Restrict check to multiple users only * 🧪 Add more tests * 🐛 Account for activation outside of canvas * ✏️ Add warning comment * 🔥 Remove unneeded check * ⏪ Revert to `new Date()` for `-1` * 🐛 Fix display for never updated
This commit is contained in:
@@ -706,10 +706,7 @@ export const emptyPackage = () => {
|
||||
// workflow
|
||||
// ----------------------------------
|
||||
|
||||
export function makeWorkflow({
|
||||
withPinData,
|
||||
withCredential,
|
||||
}: {
|
||||
export function makeWorkflow(options?: {
|
||||
withPinData: boolean;
|
||||
withCredential?: { id: string; name: string };
|
||||
}) {
|
||||
@@ -724,9 +721,9 @@ export function makeWorkflow({
|
||||
position: [740, 240],
|
||||
};
|
||||
|
||||
if (withCredential) {
|
||||
if (options?.withCredential) {
|
||||
node.credentials = {
|
||||
spotifyApi: withCredential,
|
||||
spotifyApi: options.withCredential,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -735,7 +732,7 @@ export function makeWorkflow({
|
||||
workflow.connections = {};
|
||||
workflow.nodes = [node];
|
||||
|
||||
if (withPinData) {
|
||||
if (options?.withPinData) {
|
||||
workflow.pinData = MOCK_PINDATA;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user