Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
azenla committed Aug 24, 2014
1 parent fc5a16c commit 0cd5509
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/organization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ void loadOrganization() {
github = new GitHub(auth: new Authentication.withToken(token));

github.organization(org).then((Organization org) {
return org.teams();
return org.teams().toList();
}).then((List<Team> teams) {
for (var team in teams) {
var e = new DivElement()..id = "team-${team.name}";
e.classes.add("team");
$org.append(e);
e.append(new HeadingElement.h3()..text = team.name);
team.members().then((List<TeamMember> members) {
team.members().toList().then((List<TeamMember> members) {
var divs = members.map((member) {
var h = new DivElement();
h.classes.add("box");
Expand Down
2 changes: 1 addition & 1 deletion lib/src/common/github.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class GitHub {
organization(names[i]).then((org) {
controller.add(org);
if (i == names.length - 1) {
controller.close();
controller.close();
}
});
}
Expand Down
5 changes: 5 additions & 0 deletions lib/src/common/organization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class Organization {
Organization(this.github);

static Organization fromJSON(GitHub github, input) {
if (input == null) return null;
return new Organization(github)
..login = input['login']
..id = input['id']
Expand Down Expand Up @@ -176,6 +177,7 @@ class Team {
Map<String, dynamic> json;

static Team fromJSON(GitHub github, input) {
if (input == null) return null;
return new Team(github)
..name = input['name']
..id = input['id']
Expand Down Expand Up @@ -232,6 +234,7 @@ class TeamMember {
TeamMember(this.github);

static TeamMember fromJSON(GitHub github, input) {
if (input == null) return null;
var member = new TeamMember(github);
member.login = input['login'];
member.id = input['id'];
Expand Down Expand Up @@ -260,6 +263,7 @@ class TeamRepository extends Repository {
TeamRepository(GitHub github) : super(github);

static TeamRepository fromJSON(GitHub github, input) {
if (input == null) return null;
return new TeamRepository(github)
..name = input['name']
..id = input['id']
Expand Down Expand Up @@ -318,6 +322,7 @@ class TeamRepositoryPermissions {
TeamRepositoryPermissions(this.github);

static TeamRepositoryPermissions fromJSON(GitHub github, input) {
if (input == null) return null;
return new TeamRepositoryPermissions(github)
..admin = input['admin']
..push = input['push']
Expand Down

0 comments on commit 0cd5509

Please sign in to comment.