Skip to content

Commit 30d8452

Browse files
committed
fixing the tagList for articles by sorting it lexicographically, include updatedAt in Article ouput - make the postman collection pass again
1 parent 1c670aa commit 30d8452

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ yarn-error.log*
4343

4444
# Python
4545
__pycache__
46+
47+
# Local db
48+
dev.db

apps/api/server/routes/api/articles/index.get.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default definePrivateEventHandler(async (event, {auth}) => {
1414
const articles = await usePrisma().article.findMany({
1515
omit: {
1616
body: true,
17-
updatedAt: true,
1817
},
1918
where: { AND: andQueries },
2019
orderBy: {
@@ -24,6 +23,9 @@ export default definePrivateEventHandler(async (event, {auth}) => {
2423
take: Number(query.limit) || 10,
2524
include: {
2625
tagList: {
26+
orderBy: {
27+
name: 'asc',
28+
},
2729
select: {
2830
name: true,
2931
},

0 commit comments

Comments
 (0)