11 lines
361 B
TypeScript
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
|
|
});
|
|
}
|