From 8edd9d2e66c4831dc73f15ced456375820407e56 Mon Sep 17 00:00:00 2001 From: c0repwn3r Date: Sun, 2 Apr 2023 21:49:45 -0400 Subject: [PATCH] and fix that --- trifid-api/src/routes/v1/totp_authenticators.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trifid-api/src/routes/v1/totp_authenticators.rs b/trifid-api/src/routes/v1/totp_authenticators.rs index a24e66b..955d02b 100644 --- a/trifid-api/src/routes/v1/totp_authenticators.rs +++ b/trifid-api/src/routes/v1/totp_authenticators.rs @@ -10,7 +10,7 @@ use crate::error::{APIError, APIErrorsResponse}; use trifid_api_entities::entity::totp_authenticator; use crate::config::CONFIG; use crate::timers::expires_in_seconds; -use crate::tokens::random_id; +use crate::tokens::{random_id, random_token}; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct TotpAuthenticatorsRequest {} @@ -119,7 +119,7 @@ pub async fn totp_authenticators_request(db: Data, req_data: HttpReque }; let model = totp_authenticator::Model { - id: random_id("totp"), + id: random_token("totp"), secret: Secret::Raw(totpmachine.secret.clone()).to_encoded().to_string(), url: totpmachine.get_url(), verified: false,