fix: refactor search routes (#1529)

Refactor find endpoints to be consistent in terms of input and output.
This commit is contained in:
David Nguyen
2024-12-11 19:39:50 +09:00
committed by GitHub
parent 3d7b28a92b
commit 5df1a6602e
35 changed files with 171 additions and 184 deletions

View File

@@ -86,13 +86,13 @@ export const documentRouter = router({
.query(async ({ input, ctx }) => {
const { user } = ctx;
const { search, teamId, templateId, page, perPage, orderBy, source, status } = input;
const { query, teamId, templateId, page, perPage, orderBy, source, status } = input;
const documents = await findDocuments({
userId: user.id,
teamId,
templateId,
search,
query,
source,
status,
page,