<commit_before>import { firebaseAction } from 'vuexfire'
import app from '@/firebase'

export const setGamesRef = firebaseAction(({ bindFirebaseRef }, ref) => bindFirebaseRef('games', ref))
export const initGamesRef = ({ dispatch }) => {
  const ref = app.database().ref('games')
  dispatch('setGamesRef', ref)
}

export const addGame = () => {
  app.database()
    .ref('games')
    .push({
      title: new Date().toDateString()
    })
}<commit_msg>game and story action updates - update addGame action - add addStory action<commit_after>import { firebaseAction } from 'vuexfire'
import { database } from 'firebase'
import app from '@/firebase'

export const setGamesRef = firebaseAction(({ bindFirebaseRef }, ref) => bindFirebaseRef('games', ref))

export const initGamesRef = ({ dispatch }) => {
  const ref = app.database().ref('games')
  dispatch('setGamesRef', ref)
}

export const addGame = ({ name }) => {
  app.database()
    .ref('games')
    .push({
      name: name || '',
      users: [],
      stories: [],
      created: database.ServerValue.TIMESTAMP
    })
}

export const addStory = ({ gameId, name }) => {
  app.database()
    .ref(`games/${gameId}/stories`)
    .push({
      name: name || '',
      points: ''
    })
}
{'fraction_non_alphanumeric': 0.16612903225806452, 'fraction_numerical': 0.0, 'mean_word_length': 3.5793357933579335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3473690', 'n_tokens_mistral': 397, 'n_tokens_neox': 388, 'n_words': 97}