fixed some relations & fixed list/:id route

This commit is contained in:
X4Lo committed 2024-04-05 02:41:28 +00:00
1 parent 2f27c4cfdf
commit 90cfe21f05
2 files changed
+25 -1

No files matched your search

+2
View File
@@ -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' });