fixed some relations & fixed list/:id route
This commit is contained in:
1 parent
2f27c4cfdf
commit
90cfe21f05
2 files changed
+25
-1
No files matched your search
@@ -41,6 +41,7 @@ Entry.belongsToMany(List, {
|
||||
foreignKey: 'entry_id',
|
||||
otherKey: 'list_id',
|
||||
onDelete: 'CASCADE',
|
||||
as: 'entries',
|
||||
});
|
||||
|
||||
List.belongsToMany(Entry, {
|
||||
@@ -48,6 +49,7 @@ List.belongsToMany(Entry, {
|
||||
foreignKey: 'list_id',
|
||||
otherKey: 'entry_id',
|
||||
onDelete: 'CASCADE',
|
||||
as: 'entries',
|
||||
});
|
||||
|
||||
Entry.hasMany(ListEntry, { foreignKey: 'entry_id', as: 'listEntries' });
|
||||
|
||||
Reference in new issue
Block a user