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-23 21:50:52 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ccdfd78eb3bcbe2ee0e76b1cfd257af88d5ba73c
ccdfd78e
1 parent
7c0217f9
update createAccount
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
back/src/api/User/createAccount/createAccount.js
back/src/api/User/createAccount/createAccount.js
View file @
ccdfd78
import
{
prisma
}
from
"../../../utils"
;
import
{
prisma
,
generateToken
}
from
"../../../utils"
;
import
bcrypt
from
"bcryptjs"
;
import
jwt
from
"jsonwebtoken"
;
export
default
{
Mutation
:
{
...
...
@@ -16,12 +15,7 @@ export default {
password
:
encryptPw
,
},
});
const
token
=
jwt
.
sign
(
{
id
:
user
.
id
,
},
process
.
env
.
JWT_SECRET
);
const
token
=
generateToken
(
user
.
id
);
return
{
token
,
user
};
},
},
...
...
Please
register
or
login
to post a comment