Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강동현
/
nodejs-game
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
강동현
2021-06-09 22:46:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0c6c905491af3f7dd6ee009fcca5ca044bdbfc14
0c6c9054
1 parent
22f6056f
로그인 실패시에 사유 전달
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
server/connection/Connection.ts
server/connection/Connection.ts
View file @
0c6c905
...
...
@@ -77,8 +77,11 @@ export class Connection {
private
handleLogin
(
message
:
ServerInboundMessage
<
"login"
>
):
ServerResponse
<
"login"
>
{
if
(
message
.
nickname
.
length
>
12
||
message
.
nickname
.
trim
().
length
===
0
)
{
return
{
ok
:
false
};
if
(
message
.
nickname
.
length
>
12
)
{
return
{
ok
:
false
,
reason
:
"닉네임은 최대 12글자입니다."
};
}
if
(
message
.
nickname
.
trim
().
length
===
0
)
{
return
{
ok
:
false
,
reason
:
"닉네임을 공백으로 설정할 수 없습니다."
};
}
this
.
user
=
new
User
(
message
.
nickname
,
this
);
...
...
Please
register
or
login
to post a comment