This commit is contained in:
parent
7feae78de0
commit
95469da4f8
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ impl CSRF for User {
|
||||||
///
|
///
|
||||||
/// This is useful for htmx requests to update the CSRF token in place.
|
/// This is useful for htmx requests to update the CSRF token in place.
|
||||||
async fn update_csrf(&self) -> PreEscaped<String> {
|
async fn update_csrf(&self) -> PreEscaped<String> {
|
||||||
html! { script { (format!("document.querySelectorAll('.csrf').forEach(element => {{ element.value = '{}'; }});", self.get_csrf().await)) }; }
|
html! { script { (PreEscaped(format!("document.querySelectorAll('.csrf').forEach(element => {{ element.value = '{}'; }});", self.get_csrf().await))) }; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get CSRF Token for the current session
|
/// Get CSRF Token for the current session
|
||||||
|
|
Loading…
Add table
Reference in a new issue