Server: correctly sort tags by name asc
This commit is contained in:
parent
124648d7fc
commit
178edb2025
|
@ -320,7 +320,7 @@ function listForApi (start, count, sort, callback) {
|
||||||
offset: start,
|
offset: start,
|
||||||
limit: count,
|
limit: count,
|
||||||
distinct: true, // For the count, a video can have many tags
|
distinct: true, // For the count, a video can have many tags
|
||||||
order: [ modelUtils.getSort(sort) ],
|
order: [ modelUtils.getSort(sort), [ this.sequelize.models.Tag, 'name', 'ASC' ] ],
|
||||||
include: [
|
include: [
|
||||||
{
|
{
|
||||||
model: this.sequelize.models.Author,
|
model: this.sequelize.models.Author,
|
||||||
|
@ -440,7 +440,7 @@ function searchAndPopulateAuthorAndPodAndTags (value, field, start, count, sort,
|
||||||
offset: start,
|
offset: start,
|
||||||
limit: count,
|
limit: count,
|
||||||
distinct: true, // For the count, a video can have many tags
|
distinct: true, // For the count, a video can have many tags
|
||||||
order: [ modelUtils.getSort(sort) ]
|
order: [ modelUtils.getSort(sort), [ this.sequelize.models.Tag, 'name', 'ASC' ] ]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make an exact search with the magnet
|
// Make an exact search with the magnet
|
||||||
|
|
Loading…
Reference in New Issue