cloudflare-rs
cloudflare-rs copied to clipboard
Secret endpoints only show/update/delete `secret_text`
Description
Not sure what's going on here but all of these endpoints only seem to affect encrypted secrets. It works as expected when the secrets are encrypted but nothing happens when it's in plain text.
- List secrets – GET
/accounts/{account_id}/workers/scripts/{script_name}/secrets
- Create secrets – PUT
/accounts/{account_id}/workers/scripts/{script_name}/secrets
- Delete secrets – DELETE
/accounts/{account_id}/workers/scripts/{script_name}/secrets/{secret_name}
Steps to reproduce:
- Create a cloudflare worker in the dashboard
- Add new environment variables to the project but don't encrypt it
- Make a GET request to the list secrets endpoint.
Expected result:
{
"result": [
{
"name": "hello",
"type": "plain_text"
}
],
"success": true,
"errors": [],
"messages": []
}
Actual result:
{
"result": [],
"success": true,
"errors": [],
"messages": []
}