Skip to content

Commit

Permalink
Have to use key/value.
Browse files Browse the repository at this point in the history
  • Loading branch information
p0psicles committed Aug 10, 2016
1 parent a3ffdc0 commit 2115666
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/public/static/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ angular.module('myApp.login', ['ngRoute'])

$scope.getPokemonList = function() {
$http.get('/getPokemon').then(function(response){
PokemonService.setPokemons(response.data);
PokemonService.setPokemons(response.data.pokemons);
console.log(PokemonService.getPokemons());
$location.path('/pokemonList');
});
Expand Down
3 changes: 2 additions & 1 deletion server/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def getpokemon():
pokemons.append(pokemon_attributes)

if pokemons:
return jsonify(sorted(pokemons, key=lambda k: k['IV'], reverse=True))
#logging.info(str(pokemons))
return jsonify(pokemons=sorted(pokemons, key=lambda k: k['IV'], reverse=True))
return []


Expand Down

0 comments on commit 2115666

Please sign in to comment.