mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-30 01:03:52 +00:00
Always trim username updates
This commit is contained in:
1 parent
bd93ba0e99
commit
02f9f4f7ef
1 file changed
+1
-1
@@ -140,7 +140,7 @@ router.patch(
|
||||
}
|
||||
|
||||
if (body.username) {
|
||||
const check_username = body?.username?.replace(/\s/g, "");
|
||||
const check_username = body?.username?.replace(/\s/g, "").trim();
|
||||
if (!check_username) {
|
||||
throw FieldErrors({
|
||||
username: {
|
||||
|
||||
Reference in new issue
Block a user