mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	Added second sort-field for title on api
This commit is contained in:
		@@ -802,7 +802,7 @@ router.route('/api/list/:channel_name').get(function(req, res) {
 | 
			
		||||
        {
 | 
			
		||||
            "$project": projects.project_object
 | 
			
		||||
        },
 | 
			
		||||
        { "$sort" : { "now_playing" : -1, "votes": -1, "added": 1 } }
 | 
			
		||||
        { "$sort" : { "now_playing" : -1, "votes": -1, "added": 1, "title": 1 } }
 | 
			
		||||
    ], function(err, docs) {
 | 
			
		||||
    //db.collection(channel_name).find({views: {$exists: false}}, projects.toShowChannel, function(err, docs) {
 | 
			
		||||
        if(docs.length > 0) {
 | 
			
		||||
@@ -1098,7 +1098,7 @@ router.route('/api/list/:channel_name').post(function(req, res) {
 | 
			
		||||
                                "$match": { }
 | 
			
		||||
                            },
 | 
			
		||||
                            { "$project": projects.project_object },
 | 
			
		||||
                            { "$sort" : { "now_playing" : -1, "votes": -1, "added": 1 } }
 | 
			
		||||
                            { "$sort" : { "now_playing" : -1, "votes": -1, "added": 1, "title": 1 } }
 | 
			
		||||
                        ], function(err, list) {
 | 
			
		||||
                        //db.collection(channel_name).find({views: {$exists: false}}, projects.toShowChannel, function(err, list) {
 | 
			
		||||
                            if(list.length > 0) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user