mirror of
https://github.com/Floriansylvain/SnippetsManager.git
synced 2026-08-19 11:43:15 +02:00
fix: temp fix for snippet pagination
This commit is contained in:
@@ -45,7 +45,8 @@ async function findSnippets(userId: number, pagination: Pagination): Promise<Sni
|
|||||||
select: { tag: { select: { id: true, name: true } } },
|
select: { tag: { select: { id: true, name: true } } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
...pagination,
|
skip: pagination.skip,
|
||||||
|
take: pagination.take,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +125,7 @@ async function updateSnippet(
|
|||||||
snippetId: number,
|
snippetId: number,
|
||||||
userId: number,
|
userId: number,
|
||||||
languageId: number | undefined,
|
languageId: number | undefined,
|
||||||
snippetData: any
|
snippetData: any,
|
||||||
): Promise<Prisma.BatchPayload> {
|
): Promise<Prisma.BatchPayload> {
|
||||||
return await prisma.snippet.updateMany({
|
return await prisma.snippet.updateMany({
|
||||||
where: {
|
where: {
|
||||||
@@ -143,7 +144,7 @@ async function updateSnippet(
|
|||||||
async function updateTagsFromSnippet(
|
async function updateTagsFromSnippet(
|
||||||
snippetId: number,
|
snippetId: number,
|
||||||
userId: number,
|
userId: number,
|
||||||
snippetData: any
|
snippetData: any,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
if (snippetData.tags == undefined) return
|
if (snippetData.tags == undefined) return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user