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) => {
console.log(decoded);
await db.User.update(
{ loccode: loccode },
{ where: { email: decoded.email } }
{ loc_code: Number(loccode) },
{ where: { email: decoded.email }, logging: false }
);
const payload = {
......
......@@ -26,6 +26,10 @@ export class User extends Model {
type: DataTypes.BOOLEAN,
defaultValue: false,
},
created_at: {
type: DataTypes.DATE,
defaultValue: Date.now(),
},
},
{
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