Skip to content

Commit 27edde3

Browse files
authored
docs: fix simple-profiling.md (#3988)
Fix missing negation before users[username] to check if there is no user with the inserted username. This aligns the code snippet with the one that below which implements the same check.
1 parent 1bbe644 commit 27edde3

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

locale/en/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ app.get('/newUser', (req, res) => {
3737

3838
username = username.replace(/[!@#$%^&*]/g, '');
3939

40-
if (!username || !password || users[username]) {
40+
if (!username || !password || !users[username]) {
4141
return res.sendStatus(400);
4242
}
4343

locale/es/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ app.get('/newUser', (req, res) => {
2626

2727
username = username.replace(/[!@#$%^&*]/g, '');
2828

29-
if (!username || !password || users[username]) {
29+
if (!username || !password || !users[username]) {
3030
return res.sendStatus(400);
3131
}
3232

locale/ko/docs/guides/simple-profiling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ app.get('/newUser', (req, res) => {
6464
6565
username = username.replace(/[!@#$%^&*]/g, '');
6666
67-
if (!username || !password || users.username) {
67+
if (!username || !password || !users[username]) {
6868
return res.sendStatus(400);
6969
}
7070
@@ -87,7 +87,7 @@ app.get('/newUser', (req, res) => {
8787

8888
username = username.replace(/[!@#$%^&*]/g, '');
8989

90-
if (!username || !password || users.username) {
90+
if (!username || !password || !users[username]) {
9191
return res.sendStatus(400);
9292
}
9393

locale/ro/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ app.get('/newUser', (req, res) => {
2626

2727
username = username.replace(/[!@#$%^&*]/g, '');
2828

29-
if (!username || !password || users[username]) {
29+
if (!username || !password || !users[username]) {
3030
return res.sendStatus(400);
3131
}
3232

locale/ru/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ app.get('/newUser', (req, res) => {
3636

3737
username = username.replace(/[!@#$%^&*]/g, '');
3838

39-
if (!username || !password || users[username]) {
39+
if (!username || !password || !users[username]) {
4040
return res.sendStatus(400);
4141
}
4242

locale/zh-cn/docs/guides/simple-profiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ app.get('/newUser', (req, res) => {
2626

2727
username = username.replace(/[!@#$%^&*]/g, '');
2828

29-
if (!username || !password || users.username) {
29+
if (!username || !password || !users.username) {
3030
return res.sendStatus(400);
3131
}
3232

0 commit comments

Comments
 (0)