Skip to content

Commit

Permalink
[MAPR] Set order in locale list (new order field)
Browse files Browse the repository at this point in the history
  • Loading branch information
mapalomar committed Oct 20, 2020
1 parent c171353 commit 6206466
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class ContentfulClientImpl implements ContentfulClient {
private static final String CCAA_FIELD = "fields.ccaa";
private static final String ID_FIELD = "fields.id";
private static final String DESCRIPTION_FIELD = "fields.description";
private static final String ORDER_FIELD = "fields.order";
private static final String KEY_FIELD = "fields.key";
private static final String VALUE_FIELD = "fields.value";

Expand Down Expand Up @@ -111,7 +112,7 @@ public Collection<CDAEntry> getLocales(String locale, String platformAlias) {
.where(SEARCH_CATEGORY_IN_FIELD, CATEGORY_LOCALE)
.where(LOCALE, locale)
.select(ID_FIELD, DESCRIPTION_FIELD)
.orderBy(DESCRIPTION_FIELD)
.orderBy(ORDER_FIELD)
.limit(LIMIT)
.all()
.entries()
Expand All @@ -126,7 +127,7 @@ public Collection<CDAEntry> getLocales(String locale, String platformAlias) {
.where(SEARCH_CATEGORY_IN_FIELD, CATEGORY_LOCALE)
.where(LOCALE, locale)
.select(ID_FIELD, DESCRIPTION_FIELD)
.orderBy(DESCRIPTION_FIELD)
.orderBy(ORDER_FIELD)
.limit(LIMIT)
.all()
.entries()
Expand Down

0 comments on commit 6206466

Please sign in to comment.