diff --git a/virtweb_backend/src/api_tokens.rs b/virtweb_backend/src/api_tokens.rs index 9d8bab3..91aef97 100644 --- a/virtweb_backend/src/api_tokens.rs +++ b/virtweb_backend/src/api_tokens.rs @@ -130,6 +130,8 @@ pub async fn create(t: &NewToken) -> anyhow::Result<(Token, TokenPrivKey)> { delete_after_inactivity: t.delete_after_inactivity, }; + token.save()?; + Ok((token, priv_key)) }