Publish and edit routes are working

This commit is contained in:
2021-01-30 07:40:04 +11:00
parent 689a3371f1
commit 9b8ef8f2e7
10 changed files with 107 additions and 21 deletions
+1 -6
View File
@@ -17,16 +17,11 @@ const revisions = sequelize.define('revisions', {
body: {
type: Sequelize.TEXT,
defaultValue: ''
},
revision: {
type: Sequelize.INTEGER(11),
defaultValue: 0
}
});
//relationships
revisions.hasOne(articles, { as: 'article' });
articles.hasOne(revisions, { as: 'original' });
sequelize.sync();