SIGN IN SIGN UP
payloadcms / payload UNCLAIMED

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.

0 0 277 TypeScript

fix(examples): ensure working multi-tenant example with pg (#11501)

### What?
There were a couple issues with the implementation within the example
when using postgres.
- `ensureUniqueUsername` tenant was being extracted incorrectly, should
not constrain query unless it was present
- `ensureUniqueSlug` was querying by NaN when tenant was not present on
data or originalDoc
- `users` read access was not correctly extracting the tenant id in the
correct type depending on DB

Fixes https://github.com/payloadcms/payload/issues/11484
J
Jarrod Flesch committed
4ddf96502cf91f301a0fd174dbfd5ae9801ae13c
Parent: 562acb7
Committed by GitHub <noreply@github.com> on 3/3/2025, 3:21:55 PM