docs: missing comma in custom-strategies example (#13701)

Fix missing comma at custom-strategies example
This commit is contained in:
Ilham Saputrajati
2025-09-06 12:25:51 +07:00
committed by GitHub
parent 24e436bfa8
commit 27cfe775dd

View File

@@ -49,7 +49,7 @@ export const Users: CollectionConfig = {
strategies: [ strategies: [
{ {
name: 'custom-strategy', name: 'custom-strategy',
authenticate: ({ payload, headers }) => { authenticate: async ({ payload, headers }) => {
const usersQuery = await payload.find({ const usersQuery = await payload.find({
collection: 'users', collection: 'users',
where: { where: {
@@ -66,7 +66,7 @@ export const Users: CollectionConfig = {
// Send the user with the collection slug back to authenticate, // Send the user with the collection slug back to authenticate,
// or send null if no user should be authenticated // or send null if no user should be authenticated
user: usersQuery.docs[0] ? { user: usersQuery.docs[0] ? {
collection: 'users' collection: 'users',
...usersQuery.docs[0], ...usersQuery.docs[0],
} : null, } : null,