mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-09-09 16:10:47 +02:00
added request verification sample to the curl auth create API preview example for consistency with the SDKs
This commit is contained in:
@@ -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'
|
||||
`
|
||||
: ""),
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user