gallery api update
This commit is contained in:
1 parent
7ceb862dfc
commit
ea0d1175a5
3 files changed
+45
-59
No files matched your search
@@ -1,7 +1,3 @@
|
||||
/**
|
||||
* Created by tmshv on 22/11/14.
|
||||
*/
|
||||
|
||||
import EndPoint from './EndPoint';
|
||||
|
||||
export default class APIGallery extends EndPoint {
|
||||
@@ -9,8 +5,8 @@ export default class APIGallery extends EndPoint {
|
||||
return this.request.get(`/gallery/${year}`, {cache: true});
|
||||
}
|
||||
|
||||
album(year, course, album) {
|
||||
let url = `/gallery/${year}/${course}/${album}`;
|
||||
album(year, course, album, doPopulate) {
|
||||
let url = `/gallery/${year}/${course}/${album}?populate=${doPopulate}`;
|
||||
return this.request.get(url, {cache: true});
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
export default function (app) {
|
||||
app.controller('AlbumController', ($scope, $rootScope, $http, $routeParams, team, api, menu) => {
|
||||
app.controller('AlbumController', ($scope, $rootScope, $http, $routeParams, api, menu) => {
|
||||
menu.activate('/gallery');
|
||||
|
||||
let year_uri = $routeParams.year;
|
||||
@@ -8,7 +8,8 @@ export default function (app) {
|
||||
|
||||
api.gallery.album(year_uri, course_uri, album_uri)
|
||||
.success(album => {
|
||||
album.teacherName = team.name(album['teacher']);
|
||||
//album.teacherName = team.name(album['teacher']);
|
||||
album.teacherName = album['teacher'];
|
||||
|
||||
$scope.album = album;
|
||||
$scope.crumbs = [
|
||||
|
||||
Reference in new issue
Block a user