import {Block} from '@modules/chats/interfaces';

export const mapBlocksFromDB = (blocks: string): Block[] => {
  return JSON.parse(blocks) as Block[];
};

export const mapBlocksToDB = (blocks: Block[]): string => {
  return JSON.stringify(blocks);
};
