implement secrets read from env vars

This commit is contained in:
2026-10-06 16:00:51 -05:00
parent 576199b1e9
commit 370fe2e4aa
10 changed files with 49 additions and 17 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ type HistoryViewEntry = (String, String, bool, String, String);
async fn get_submission_history(
secret_key: String,
) -> Result<Vec<HistoryViewEntry>, ServerFnError> {
if !crate::manage::valid_status_secret_key(&secret_key) {
if !crate::secrets::validate_dev_secret_key(&secret_key)? {
return Err(ServerFnError::new("Invalid secret key"));
}
@@ -243,7 +243,7 @@ fn persist_submission(submission: &SuccessfulSubmission) -> Result<(), ServerFnE
#[server]
async fn clear_submission_history(secret_key: String) -> Result<(), ServerFnError> {
if !crate::manage::valid_status_secret_key(&secret_key) {
if !crate::secrets::validate_dev_secret_key(&secret_key)? {
return Err(ServerFnError::new("Invalid secret key"));
}