Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
eue
Commits
d671b124
Commit
d671b124
authored
Jul 26, 2021
by
KangMin An
Browse files
Update: Add User Field Created_at.
parent
7f222365
Changes
2
Show whitespace changes
Inline
Side-by-side
server/src/controllers/userController.js
View file @
d671b124
...
@@ -168,8 +168,8 @@ export const postSetLoccode = async (req, res) => {
...
@@ -168,8 +168,8 @@ export const postSetLoccode = async (req, res) => {
console
.
log
(
decoded
);
console
.
log
(
decoded
);
await
db
.
User
.
update
(
await
db
.
User
.
update
(
{
loccode
:
loccode
},
{
loc
_
code
:
Number
(
loccode
)
},
{
where
:
{
email
:
decoded
.
email
}
}
{
where
:
{
email
:
decoded
.
email
}
,
logging
:
false
}
);
);
const
payload
=
{
const
payload
=
{
...
...
server/src/models/user.js
View file @
d671b124
...
@@ -26,6 +26,10 @@ export class User extends Model {
...
@@ -26,6 +26,10 @@ export class User extends Model {
type
:
DataTypes
.
BOOLEAN
,
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
false
,
defaultValue
:
false
,
},
},
created_at
:
{
type
:
DataTypes
.
DATE
,
defaultValue
:
Date
.
now
(),
},
},
},
{
{
sequelize
,
sequelize
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment