<commit_before>'use strict';

const sgAuthApi = require('sg-auth-api').boot;

module.exports = function (server) {
  server.use(sgAuthApi({
    models: {
      user: () => server.models.SgUser,
      token: () => server.models.AccessToken
    }
  }));
};<commit_msg>Add error logs to /api/auth<commit_after>'use strict';

const sgAuthApi = require('sg-auth-api').boot;
const logger = require('../services/winston-config.js')();

module.exports = function (server) {
  server.use(sgAuthApi({
    models: {
      user: () => server.models.SgUser,
      token: () => server.models.AccessToken
    }
  }, logger));
};
{'fraction_non_alphanumeric': 0.18433931484502447, 'fraction_numerical': 0.0, 'mean_word_length': 3.514705882352941, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4888280', 'n_tokens_mistral': 206, 'n_tokens_neox': 203, 'n_words': 36}