Mise à jour de routes et models
This commit is contained in:
@@ -13,8 +13,8 @@ module.exports = (sequelize, DataTypes) => {
|
||||
}
|
||||
}
|
||||
Comment.init({
|
||||
comment_id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true, allowNull: false },
|
||||
comment_body: { type: DataTypes.TEXT, allowNull: false }
|
||||
commentId: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true, allowNull: false },
|
||||
body: { type: DataTypes.TEXT, allowNull: false }
|
||||
}, {
|
||||
sequelize,
|
||||
timestamps: false,
|
||||
@@ -26,8 +26,8 @@ module.exports = (sequelize, DataTypes) => {
|
||||
|
||||
Comment.prototype.toJSONFor = function () {
|
||||
return {
|
||||
id: this.comment_id,
|
||||
body: this.comment_body
|
||||
commentId: this.commentId,
|
||||
body: this.body
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user