changing to SortTable

This commit is contained in:
2024-12-15 23:39:56 -05:00
parent 0638a8cd52
commit 76a144111d
10 changed files with 69 additions and 6 deletions

View File

@@ -142,4 +142,14 @@ export async function getARParts(page = 1) {
.limit(limit)
.where(and(like(psa.fineline, "%Trigger%"), like(psa.category, "Ar Parts")))
.offset(offset);
}
export async function getMags(page = 1) {
const limit = 40;
const offset = (page - 1) * limit;
return await db.select()
.from(psa)
.limit(limit)
.where(and(like(psa.fineline, "%Magazine%"), like(psa.category, "Ar Parts")))
.offset(offset);
}