import MuseumModel from './models/museum'
import logger from './logger'

export async function getMuseumDocument() {
  const museum = await MuseumModel.findOne()
  if (museum) {
    return museum
  }

  logger.info('Creating museum stats document (db)')
  const document = await new MuseumModel().save()
  return document
}
