mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-26 15:17:30 +00:00
Always trim username updates
This commit is contained in:
@@ -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