Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-08-05 15:14:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c6ea6fd8437c40ff03e596a60a5062e422e4e714
c6ea6fd8
1 parent
eec2c042
remove password2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
14 deletions
back/src/api/User/createAccount/createAccount.graphql
back/src/api/User/createAccount/createAccount.js
back/src/api/User/createAccount/createAccount.graphql
View file @
c6ea6fd
...
...
@@ -3,7 +3,6 @@ type Mutation {
username: String!
email: String!
password: String!
password2: String!
phoneNum: String!
bio: String
avatarUrl: String
...
...
back/src/api/User/createAccount/createAccount.js
View file @
c6ea6fd
...
...
@@ -4,19 +4,7 @@ import bcrypt from "bcryptjs";
export
default
{
Mutation
:
{
createAccount
:
async
(
_
,
args
)
=>
{
const
{
username
,
password
,
password2
,
email
,
phoneNum
,
bio
,
avatarUrl
,
}
=
args
;
if
(
password
!==
password2
)
{
throw
new
Error
(
"two password aren't same each other"
);
}
const
{
username
,
password
,
email
,
phoneNum
,
bio
,
avatarUrl
}
=
args
;
const
encryptPw
=
await
bcrypt
.
hash
(
password
,
10
);
// TODO: Find user's country code and change new phone number value
...
...
Please
register
or
login
to post a comment