import {getDatabase} from './getDB';
import {databaseNames} from './types';

export const setEntry = async (dbName: databaseNames, value: any) => {
  const realm = await getDatabase(dbName);

  realm.write(() => {
    realm.create(dbName, value, Realm.UpdateMode.Modified);
  });
};
