Commit d671b124 authored by KangMin An's avatar KangMin An
Browse files

Update: Add User Field Created_at.

parent 7f222365
...@@ -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 = {
......
...@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment