Fix exercices' theme loading in admin

This commit is contained in:
nemunaire 2020-05-16 03:52:11 +02:00
parent 64b9e9a251
commit 5b84e4bfdb
2 changed files with 2 additions and 2 deletions

View File

@ -273,7 +273,7 @@ angular.module("FICApp")
})
})
.factory("ThemedExercice", function($resource) {
return $resource("/api/themes/:themeId/exercices/:exerciceId", { exerciceId: '@id' }, {
return $resource("/api/themes/:themeId/exercices/:exerciceId", { themeId: '@id', exerciceId: '@idExercice' }, {
update: {method: 'PUT'}
})
})

View File

@ -16,7 +16,7 @@
</div>
</form>
<div ng-show="theme.id" class="col-md-8" ng-controller="ExercicesListController">
<div ng-if="theme.id" class="col-md-8" ng-controller="ExercicesListController">
<h3>
Exercices ({{ exercices.length }})
<button type="button" ng-click="show('new')" class="float-right btn btn-sm btn-primary ml-2"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Ajouter un exercice</button>