implemented hooks for user-collections & user-collection-entry models to update updatedAt and order fields
This commit is contained in:
1 parent
36866dabe6
commit
cea1b207a3
12 files changed
+170
-61
No files matched your search
+1
-5
@@ -124,11 +124,7 @@ export class UserCollectionsModalComponent implements OnInit {
|
||||
`Adding Entry ${this.entryId} to list: ${userCollection.name}`
|
||||
);
|
||||
this.listService
|
||||
.addEntryToCollection(
|
||||
userCollection.id,
|
||||
this.entryId,
|
||||
userCollection.userCollectionEntries.length + 1
|
||||
)
|
||||
.addEntryToCollection(userCollection.id, this.entryId)
|
||||
.subscribe({
|
||||
next: (response) => {
|
||||
console.log('Successfuly added Entry To Collection:', response);
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import { Entry } from '../entry.model';
|
||||
|
||||
export interface CollectionEntry extends Entry {
|
||||
order: number;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Entry } from './entry.model';
|
||||
import { CollectionEntry } from './dtos/collection-entry.dto';
|
||||
import { UserCollectionEntry } from './userCollectionEntry.model';
|
||||
|
||||
export interface UserCollection {
|
||||
@@ -11,7 +11,7 @@ export interface UserCollection {
|
||||
poster_path: string;
|
||||
|
||||
userCollectionEntries: UserCollectionEntry[];
|
||||
entries: Entry[];
|
||||
entries: CollectionEntry[];
|
||||
changed: boolean;
|
||||
isChecked: boolean;
|
||||
|
||||
|
||||
Reference in new issue
Block a user