<commit_before>/**
 * Created by Mihail on 9/14/2016.
 */
var express = require('express');
var router = express.Router();
var jwt = require('express-jwt');
require('dotenv').config();

var auth = jwt({
	secret:  process.env.DB_SECRET,
	userProperty: 'payload'
});

// Back office app
var ctrlBackOffice = require('../controllers/back-office');
var ctrlAdminsAuth = require('../controllers/admins-auth');
router.get('/getPlayersData', auth, ctrlBackOffice.getPlayersData);
router.post('/createPlayer', auth, ctrlBackOffice.createPlayer);
router.post('/deletePlayer', auth, ctrlBackOffice.deletePlayer);
router.post('/updatePlayerData', auth, ctrlBackOffice.updatePlayerData);
router.post('/loginAdmin', ctrlAdminsAuth.loginAdmin);
// Disabled for security reasons - for the moment the admins will be added only manually
// router.post('/registerAdmin', ctrlAdminsAuth.register);

// Main app
var ctrlProfile = require('../controllers/profile');
var ctrlAuth = require('../controllers/users-auth');
router.post('/setNewBalance', auth, ctrlProfile.setNewBalance);
router.get('/profile', auth, ctrlProfile.profileRead);
router.post('/register', ctrlAuth.register);
router.post('/login', ctrlAuth.login);<commit_msg>Added functionality for setting wins count, i.e. how many bingos had a player won so far - server side.<commit_after>/**
 * Created by Mihail on 9/14/2016.
 */
var express = require('express');
var router = express.Router();
var jwt = require('express-jwt');
require('dotenv').config();

var auth = jwt({
	secret:  process.env.DB_SECRET,
	userProperty: 'payload'
});

// Back office app
var ctrlBackOffice = require('../controllers/back-office');
var ctrlAdminsAuth = require('../controllers/admins-auth');
router.get('/getPlayersData', auth, ctrlBackOffice.getPlayersData);
router.post('/createPlayer', auth, ctrlBackOffice.createPlayer);
router.post('/deletePlayer', auth, ctrlBackOffice.deletePlayer);
router.post('/updatePlayerData', auth, ctrlBackOffice.updatePlayerData);
router.post('/loginAdmin', ctrlAdminsAuth.loginAdmin);
// Disabled for security reasons - for the moment the admins will be added only manually
// router.post('/registerAdmin', ctrlAdminsAuth.register);

// Main app
var ctrlProfile = require('../controllers/profile');
var ctrlAuth = require('../controllers/users-auth');
router.post('/setNewBalance', auth, ctrlProfile.setNewBalance);
router.get('/profile', auth, ctrlProfile.profileRead);
router.post('/register', ctrlAuth.register);
router.post('/login', ctrlAuth.login);
router.post('/setWins', ctrlAuth.setNewWins);
{'fraction_non_alphanumeric': 0.1609375, 'fraction_numerical': 0.00546875, 'mean_word_length': 5.921621621621622, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5077015', 'n_tokens_mistral': 770, 'n_tokens_neox': 745, 'n_words': 178}