<commit_before>'use strict';

module.exports = function (app) {
	var users = require('../../app/controllers/users.server.controller');
	var slideshows = require('../../app/controllers/slideshows.server.controller');
    var pptOnline = require('../../app/controllers/pdfProxy.server.controller');

	// Slideshows Routes
	app.route('/slideshows')
		.get(users.requiresLogin, slideshows.list)
        .post(users.requiresLogin, slideshows.create);

	app.route('/slideshows/filter')
		.get(users.requiresLogin, slideshows.list);

	app.route('/slideshows/filterByName')
		.get(users.requiresLogin, slideshows.filterByName);

	app.route('/slideshows/filteredNamesAndTags')
		.get(users.requiresLogin, slideshows.getFilteredNamesAndTags);

	app.route('/slideshows/:slideshowId')
		.get(slideshows.read)
		.put(users.requiresLogin, slideshows.hasAuthorization, slideshows.update)
		.delete(users.requiresLogin, slideshows.hasAuthorization, slideshows.delete);

    app.route('/slideshows/:slideshowId/:slideNumber')
		.get(slideshows.readSlide);

    app.route('/slideshowDevices/:slideshowId')
		.get(slideshows.getDevices)
        .put(users.requiresLogin, slideshows.hasAuthorization, slideshows.setDevices);

	app.route('/templates')
		.get(slideshows.getTemplates);

	app.route('/pdfProxy/:pdfUrl')
		.get(pptOnline.getPdf);
		
	// Finish by binding the Slideshow middleware
	app.param('slideshowId', slideshows.slideshowByID);
    app.param('slideNumber', slideshows.slideByNumber);
};
<commit_msg>[IQSLDSH-211] - Slideshows list is empty on mobile device<commit_after>'use strict';

module.exports = function (app) {
	var users = require('../../app/controllers/users.server.controller');
	var slideshows = require('../../app/controllers/slideshows.server.controller');
    var pptOnline = require('../../app/controllers/pdfProxy.server.controller');

	// Slideshows Routes
	app.route('/slideshows')
		.get(slideshows.list)
        .post(users.requiresLogin, slideshows.create);

	app.route('/slideshows/filter')
		.get(users.requiresLogin, slideshows.list);

	app.route('/slideshows/filterByName')
		.get(users.requiresLogin, slideshows.filterByName);

	app.route('/slideshows/filteredNamesAndTags')
		.get(users.requiresLogin, slideshows.getFilteredNamesAndTags);

	app.route('/slideshows/:slideshowId')
		.get(slideshows.read)
		.put(users.requiresLogin, slideshows.hasAuthorization, slideshows.update)
		.delete(users.requiresLogin, slideshows.hasAuthorization, slideshows.delete);

    app.route('/slideshows/:slideshowId/:slideNumber')
		.get(slideshows.readSlide);

    app.route('/slideshowDevices/:slideshowId')
		.get(slideshows.getDevices)
        .put(users.requiresLogin, slideshows.hasAuthorization, slideshows.setDevices);

	app.route('/templates')
		.get(slideshows.getTemplates);

	app.route('/pdfProxy/:pdfUrl')
		.get(pptOnline.getPdf);
		
	// Finish by binding the Slideshow middleware
	app.param('slideshowId', slideshows.slideshowByID);
    app.param('slideNumber', slideshows.slideByNumber);
};

{'fraction_non_alphanumeric': 0.1537951607557176, 'fraction_numerical': 0.0009943652635067948, 'mean_word_length': 4.976237623762376, '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': '7134815', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1035, 'n_words': 124}