refactor(core): Move third batch of repositories to @n8n/db (#15166)

This commit is contained in:
Iván Ovejero
2025-05-09 09:57:54 +02:00
committed by GitHub
parent 3079059e96
commit f2ee990a57
58 changed files with 155 additions and 139 deletions

View File

@@ -1,9 +1,8 @@
import { generateNanoId } from '@n8n/db';
import { VariablesRepository } from '@n8n/db';
import { Container } from '@n8n/di';
import { randomString } from 'n8n-workflow';
import { VariablesRepository } from '@/databases/repositories/variables.repository';
export async function createVariable(key = randomString(5), value = randomString(5)) {
return await Container.get(VariablesRepository).save({ id: generateNanoId(), key, value });
}