fix editor bug for non-existing records

This commit is contained in:
2025-03-07 14:56:08 -05:00
parent 5a4d054cb5
commit 2d0787e7ea

View File

@@ -40,7 +40,13 @@ func EditorHandler(w http.ResponseWriter, r *http.Request) {
if editorType == EDITOR_TYPE_EDIT { if editorType == EDITOR_TYPE_EDIT {
id := r.PathValue("id") id := r.PathValue("id")
secret, _ = entries.FetchSecretFromID(identity.UserID, identity.MasterKey, id) var fetchErr error
secret, fetchErr = entries.FetchSecretFromID(identity.UserID, identity.MasterKey, id)
if fetchErr != nil {
http.Redirect(w, r, "/app", http.StatusFound)
return
}
} }
} }