<commit_before>global.cobudgetApp.factory 'UserRecordsInterface', (config, BaseRecordsInterface, UserModel) ->
  class UserRecordsInterface extends BaseRecordsInterface
    model: UserModel
    constructor: (recordStore) ->
      @baseConstructor recordStore
      @remote.apiPrefix = config.apiPrefix

    confirmAccount: (params)->
      @remote.post('confirm_account', params)

    requestPasswordReset: (params) ->
      @remote.post('request_password_reset', params)

    resetPassword: (params) ->
      @remote.post('reset_password', params)

    updateProfile: (params) ->
      params = morph.toSnake(params)
      @remote.post('update_profile', user: params)

    inviteToCreateGroup: (params) ->
      @remote.post('invite_to_create_group', params)

    updatePassword: (params) ->
      @remote.post('update_password', params)

    fetchMe: ->
      @remote.get('me', {})
<commit_msg>in UsersRecordsInterface#fetchMe, only hit 'users#me' if user isn't in local db<commit_after>global.cobudgetApp.factory 'UserRecordsInterface', (config, BaseRecordsInterface, $q, UserModel) ->
  class UserRecordsInterface extends BaseRecordsInterface
    model: UserModel
    constructor: (recordStore) ->
      @baseConstructor recordStore
      @remote.apiPrefix = config.apiPrefix

    confirmAccount: (params)->
      @remote.post('confirm_account', params)

    requestPasswordReset: (params) ->
      @remote.post('request_password_reset', params)

    resetPassword: (params) ->
      @remote.post('reset_password', params)

    updateProfile: (params) ->
      params = morph.toSnake(params)
      @remote.post('update_profile', user: params)

    inviteToCreateGroup: (params) ->
      @remote.post('invite_to_create_group', params)

    updatePassword: (params) ->
      @remote.post('update_password', params)

    fetchMe: ->
      deferred = $q.defer()
      if @find(global.cobudgetApp.currentUserId)
        deferred.resolve()
      else
        @remote.get('me', {}).then ->
          deferred.resolve()
      deferred.promise

{'fraction_non_alphanumeric': 0.1255517410495341, 'fraction_numerical': 0.0, 'mean_word_length': 3.6363636363636362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 22, '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': '6714964', 'n_tokens_mistral': 592, 'n_tokens_neox': 580, 'n_words': 112}