Refactored retrieval of categories and improved runtime search of files in category

Fixed issue with editing/saving categories

Database queries can now handle nested object paths

Code cleanup
This commit is contained in:
Isaac Abadi
2022-06-17 19:43:32 -04:00
parent c810d4d878
commit b56c66f705
10 changed files with 50 additions and 30 deletions

View File

@@ -457,15 +457,15 @@ export class PostsService implements CanActivate {
return this.http.post<GetPlaylistResponse>(this.path + 'getPlaylist', body, this.httpOptions);
}
getPlaylists(include_categories = false) {
return this.http.post<GetPlaylistsRequest>(this.path + 'getPlaylists', {include_categories: include_categories}, this.httpOptions);
}
incrementViewCount(file_uid, sub_id, uuid) {
const body: IncrementViewCountRequest = {file_uid: file_uid, sub_id: sub_id, uuid: uuid};
return this.http.post<SuccessObject>(this.path + 'incrementViewCount', body, this.httpOptions);
}
getPlaylists() {
return this.http.post<GetPlaylistsRequest>(this.path + 'getPlaylists', {}, this.httpOptions);
}
updatePlaylist(playlist: Playlist) {
const body: UpdatePlaylistRequest = {playlist: playlist};
return this.http.post<SuccessObject>(this.path + 'updatePlaylist', body, this.httpOptions);