Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pages/api/links/[id]/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ export default async function handle(
},
},
},
orderBy: {
document: {
name: "asc",
},
},
},
folders: {
orderBy: {
Expand Down
5 changes: 5 additions & 0 deletions pages/api/links/domains/[...domainSlug].ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ export default async function handle(
},
},
},
orderBy: {
document: {
name: "asc",
},
},
},
folders: {
orderBy: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export default async function handle(
folderId: null,
},
orderBy: {
createdAt: "desc",
document: {
name: "asc",
},
},
include: {
document: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ export default async function handle(
dataroomId: dataroomId,
folderId: folder.id,
},
orderBy: {
createdAt: "desc",
},
select: {
id: true,
dataroomId: true,
Expand All @@ -85,6 +82,11 @@ export default async function handle(
},
},
},
orderBy: {
document: {
name: "asc",
},
},
});

return res.status(200).json(documents);
Expand Down
10 changes: 10 additions & 0 deletions pages/api/teams/[teamId]/datarooms/[id]/folders/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ export default async function handle(
},
},
},
orderBy: {
document: {
name: "asc",
},
},
},
childFolders: {
include: {
Expand All @@ -97,6 +102,11 @@ export default async function handle(
},
},
},
orderBy: {
document: {
name: "asc",
},
},
},
},
},
Expand Down