mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
added message for challenges that could not be found - fixes #5538
closes #8176
This commit is contained in:
committed by
Blade Barringer
parent
a2dd82b6db
commit
b094fb1e52
@@ -493,6 +493,8 @@ habitrpg.controller("ChallengesCtrl", ['$rootScope','$scope', 'Shared', 'User',
|
||||
.then(function (response) {
|
||||
var challenge = response.data.data;
|
||||
$scope.challenges = [challenge];
|
||||
}).catch(function(err) {
|
||||
$scope.challengeErrorMsg = err.data.message;
|
||||
});
|
||||
} else {
|
||||
Challenges.getUserChallenges()
|
||||
|
||||
@@ -210,3 +210,6 @@ script(type='text/ng-template', id='partials/options.social.challenges.html')
|
||||
.panel-body(ng-class='{collapse: !$stateParams.cid == challenge._id}')
|
||||
.accordion-inner(ng-if='$stateParams.cid == challenge._id')
|
||||
div(ui-view)
|
||||
|
||||
.container-fluid
|
||||
.alert.alert-danger(ng-if='challengeErrorMsg') {{challengeErrorMsg}}
|
||||
|
||||
Reference in New Issue
Block a user