Skip to content

Commit

Permalink
sort signups by created at
Browse files Browse the repository at this point in the history
  • Loading branch information
MikaelSiidorow committed Jan 27, 2024
1 parent 9920ef0 commit 9075282
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cms/src/api/order/controllers/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* order controller
*/

import { factories } from '@strapi/strapi'
import { factories } from '@strapi/strapi';

export default factories.createCoreController('api::order.order', {
async findByUid(ctx) {
Expand Down Expand Up @@ -57,6 +57,9 @@ export default factories.createCoreController('api::order.order', {
}
}
},
orderBy: {
createdAt: 'asc',
},
populate: {
customer: true,
},
Expand Down
2 changes: 1 addition & 1 deletion web/app/[locale]/signups/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fetchAPI } from "@/lib/api";
import GoBack from "./GoBack";
import { ItemCategory, StrapiBaseType } from "@/utils/models";
import { getTranslation } from "@/utils/translationHelper";
import GoBack from "./GoBack";
export const dynamic = "force-dynamic";

type Field = StrapiBaseType<{
Expand Down

0 comments on commit 9075282

Please sign in to comment.