'use strict';

const store = require('./store-5a3b44dc.js');

async function findUser(db, id) {
  const data = await db.find("users", id);
  store.state.users = { ...store.state.users, [id]: data };
  if (!data)
    return null;
  return { ...data, id };
}

exports.findUser = findUser;
