Files
Toju/electron/cqrs/commands/handlers/saveMeta.ts
2026-04-29 01:14:30 +02:00

11 lines
361 B
TypeScript

import { DataSource } from 'typeorm';
import { MetaEntity } from '../../../entities';
import { SaveMetaCommand } from '../../types';
export async function handleSaveMeta(command: SaveMetaCommand, dataSource: DataSource): Promise<void> {
await dataSource.getRepository(MetaEntity).save({
key: command.payload.key,
value: command.payload.value
});
}