From 595e79a0145edd9034667b2268445224ed1ef2af Mon Sep 17 00:00:00 2001 From: realaravinth Date: Thu, 12 Aug 2021 17:22:41 +0530 Subject: [PATCH] update sqlx data, delete user in username_change test --- sqlx-data.json | 13 +++++++++++++ src/api/v1/account/test.rs | 8 ++++++-- templates/auth/captcha/index.ts | 4 ++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/sqlx-data.json b/sqlx-data.json index 3af2cf69..16e79325 100644 --- a/sqlx-data.json +++ b/sqlx-data.json @@ -53,6 +53,19 @@ ] } }, + "2021bc0eb03df51af06b59e2a1efdba231e8f35d9cfb5c5b55241c566b9055ce": { + "query": "UPDATE mcaptcha_users set name = $1\n WHERE name = $2", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar", + "Text" + ] + }, + "nullable": [] + } + }, "238569a64d7dbd252e3b27204f207e8a8548109717b89495ddf8f9a870c7c75d": { "query": "UPDATE mcaptcha_config SET name = $1, duration = $2 \n WHERE user_id = (SELECT ID FROM mcaptcha_users WHERE name = $3)\n AND key = $4", "describe": { diff --git a/src/api/v1/account/test.rs b/src/api/v1/account/test.rs index 2fc3f9f8..7861808b 100644 --- a/src/api/v1/account/test.rs +++ b/src/api/v1/account/test.rs @@ -210,8 +210,12 @@ async fn username_update_works() { { let data = Data::new().await; - delete_user(NAME, &data).await; - delete_user(NAME2, &data).await; + + futures::join!( + delete_user(NAME, &data), + delete_user(NAME2, &data), + delete_user(NAME_CHANGE, &data) + ); } let _ = register_and_signin(NAME2, EMAIL2, PASSWORD).await; diff --git a/templates/auth/captcha/index.ts b/templates/auth/captcha/index.ts index 82aea350..d9ca71dc 100644 --- a/templates/auth/captcha/index.ts +++ b/templates/auth/captcha/index.ts @@ -14,6 +14,6 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -import init from 'mcaptcha-glue'; +import * as lib from 'mcaptcha-glue'; -export const register = () => init(); +export const register = () => lib.init();