mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +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
|
"$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) {
|
], function(err, docs) {
|
||||||
//db.collection(channel_name).find({views: {$exists: false}}, projects.toShowChannel, function(err, docs) {
|
//db.collection(channel_name).find({views: {$exists: false}}, projects.toShowChannel, function(err, docs) {
|
||||||
if(docs.length > 0) {
|
if(docs.length > 0) {
|
||||||
@@ -1098,7 +1098,7 @@ router.route('/api/list/:channel_name').post(function(req, res) {
|
|||||||
"$match": { }
|
"$match": { }
|
||||||
},
|
},
|
||||||
{ "$project": projects.project_object },
|
{ "$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) {
|
], function(err, list) {
|
||||||
//db.collection(channel_name).find({views: {$exists: false}}, projects.toShowChannel, function(err, list) {
|
//db.collection(channel_name).find({views: {$exists: false}}, projects.toShowChannel, function(err, list) {
|
||||||
if(list.length > 0) {
|
if(list.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user