From b7de46fb22618173e87dd0c0feb0b45d37ae767a Mon Sep 17 00:00:00 2001 From: Rehankhan009 <101113393+Rehankhan009@users.noreply.github.com> Date: Fri, 12 Dec 2025 22:59:11 +0530 Subject: [PATCH] fix: last name with space issue --- app/constants/apis.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/constants/apis.js b/app/constants/apis.js index 4abc2b46..e486ed8b 100644 --- a/app/constants/apis.js +++ b/app/constants/apis.js @@ -22,11 +22,11 @@ export const GENERATE_USERNAME_URL = ( sanitizedFirstname, sanitizedLastname, ) => { - return `${APPS.API_BACKEND}/users/username?dev=true&firstname=${sanitizedFirstname}&lastname=${sanitizedLastname}`; + return `${APPS.API_BACKEND}/users/username?dev=true&firstname=${encodeURIComponent(sanitizedFirstname)}&lastname=${encodeURIComponent(sanitizedLastname)}`; }; export const CHECK_USERNAME_AVAILABILITY = (userName) => { - return `${APPS.API_BACKEND}/users/isUsernameAvailable/${userName}`; + return `${APPS.API_BACKEND}/users/isUsernameAvailable/${encodeURIComponent(userName)}`; }; export const SELF_USERS_URL = `${APPS.API_BACKEND}/users/self`;