Skip to content

Commit 4efb28e

Browse files
author
Ian Redpath
committed
remove comments/dead code
1 parent 8c51e26 commit 4efb28e

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

public/project/components/movies/movie.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ export class Movie {
3030
this.fetchingMovie = true
3131
this.fetchingLibraries = true
3232
const imdbId: string = params.get('movie')
33-
/*movieService.get(imdbId)
34-
.subscribe(
35-
resp => {
36-
if (resp.json().movie) {
37-
this.movie = resp.json().movie
38-
}
39-
this.fetchingLibraries = false
40-
})*/
4133
omdbService.findMovieById(imdbId)
4234
.subscribe(
4335
data => {

public/project/services/libraryService.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,21 @@ export class LibraryService {
1111
constructor(public http: Http) {
1212
this.headers = new Headers()
1313
this.headers.append("Content-Type", "application/json")
14-
/*this.libraries = {}
15-
const sampleLibraryData = [
16-
{
17-
id: 1, name: "sample1", movies: [{ id: 1, imdbId: "tt0120338", title: "Titanic" }],
18-
comments: [], ratings: [], user: { username: "alice", id: 123 }
19-
},
20-
{
21-
id: 2, name: "sample2", movies: [
22-
{ id: 2, imdbId: "tt0096895", title: "Batman" },
23-
{ id: 3, imdbId: "tt1431045", title: "Deadpool" }],
24-
comments: [], ratings: [], user: { username: "alice", id: 123 }
25-
},
26-
{
27-
id: 3, name: "sample3", movies: [
28-
{ id: 1, imdbId: "tt0120338", title: "Titanic" },
29-
{ id: 3, imdbId: "tt1431045", title: "Deadpool" }],
30-
comments: [], ratings: [], user: { username: "bob", id: 234 }
31-
}
32-
]
33-
_.forEach(sampleLibraryData, lib => {
34-
let model: LibraryModel = LibraryModel.newLibrary(lib)
35-
this.libraries[model.id] = model
36-
})*/
3714
}
3815

3916
get(id: number) {
4017
return this.http.get(`/api/project/library/${id}`,
4118
{ headers: this.headers })
42-
//return this.libraries[id]
4319
}
4420

4521
addLibrary(library: LibraryModel) {
4622
return this.http.post('/api/project/library', JSON.stringify({ library }),
4723
{ headers: this.headers })
48-
//this.libraries[library.id] = library
4924
}
5025

5126
getAll() {
5227
return this.http.get('/api/project/library',
5328
{ headers: this.headers })
54-
//return <Array<LibraryModel>> _.values(this.libraries)
55-
}
56-
57-
getLibrariesWith(id: string): Array<LibraryModel> {
58-
return _.filter(<Array<LibraryModel>> _.values(this.libraries), lib => {
59-
return _.some(lib.movies, movie => {
60-
return movie.imdbId === id
61-
})
62-
})
6329
}
6430

6531
updateLibrary(library) {
@@ -69,7 +35,6 @@ export class LibraryService {
6935
removeLibrary(id: number) {
7036
return this.http.delete(`/api/project/library/${id}`,
7137
{ headers: this.headers })
72-
//delete this.libraries[id]
7338
}
7439

7540
removeMovie(libraryId: number, movieId: string) {

0 commit comments

Comments
 (0)