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-04-25 23:10:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ac4daada98f6ecf854afb27eee0cf791de809ecc
ac4daada
1 parent
056b857e
update createAccount
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
9 deletions
back/src/api/User/createAccount/createAccount.graphql
back/src/api/User/createAccount/createAccount.js
back/src/api/User/createAccount/createAccount.graphql
View file @
ac4daad
...
...
@@ -5,6 +5,5 @@ type Mutation {
password: String!
bio: String
avatarUrl: String
phoneNumber: String
): AuthPayload!
}
...
...
back/src/api/User/createAccount/createAccount.js
View file @
ac4daad
...
...
@@ -4,14 +4,7 @@ import bcrypt from "bcryptjs";
export
default
{
Mutation
:
{
createAccount
:
async
(
_
,
args
)
=>
{
const
{
name
,
password
,
email
,
bio
=
""
,
avatarUrl
=
""
,
phoneNumber
=
""
,
}
=
args
;
const
{
name
,
password
,
email
,
bio
,
avatarUrl
,
phoneNumber
}
=
args
;
const
encryptPw
=
await
bcrypt
.
hash
(
password
,
10
);
const
user
=
await
prisma
.
user
.
create
({
data
:
{
...
...
Please
register
or
login
to post a comment