added request verification sample to the curl auth create API preview example for consistency with the SDKs

This commit is contained in:
Gani Georgiev
2026-07-30 17:43:54 +03:00
parent 4dc4387638
commit fd25a8ae32
10 changed files with 83 additions and 69 deletions
+14 -6
View File
@@ -151,12 +151,20 @@ await pb.collection('${collection?.name}').requestVerification(
title: "curl",
language: "bash",
value: `
curl -X POST \\
-H 'Authorization:TOKEN' \\
-H 'Content-Type:application/json' \\
-d '{ ... }' \\
'${baseURL}/api/collections/${collection.name}/records'
`,
curl -X POST \\
-H 'Authorization:TOKEN' \\
-H 'Content-Type:application/json' \\
-d '{ ... }' \\
'${baseURL}/api/collections/${collection.name}/records'
` + (isAuth
? `
# (optional) send an email verification request
curl -X POST \\
-H 'Content-Type:application/json' \\
-d '{ "email":"test@example.com" }' \\
'${baseURL}/api/collections/${collection.name}/request-verification'
`
: ""),
},
],
}),