Kundenliste: alle Kunden laden statt Appwrite-Default von 25

Ohne Query.limit liefert Appwrite nur 25 Dokumente. Bei 110 Kunden fehlten
in WOMS alle Kunden ab 'Autowerkstatt ...' alphabetisch - neu angelegte
Leads wirkten dadurch, als waeren sie nie angelegt worden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-09-22 18:58:03 +00:00
1 parent 7860347070
commit c3f56ba290
1 file changed
+5 -1
+5 -1
View File
@@ -236,7 +236,11 @@ export async function updateCustomerWithPortalAccess(customerId, payload) {
}
export async function listCustomersForAdmin() {
const customers = await listDocuments(config.collections.customers, [Query.orderAsc('name')])
// Ohne Limit liefert Appwrite nur 25 Dokumente - neue Kunden fielen dann aus der Liste.
const customers = await listDocuments(config.collections.customers, [
Query.orderAsc('name'),
Query.limit(5000),
])
return customers.map((customer) => sanitizeCustomer(customer))
}