Skip to content

Commit

Permalink
✨ 更新要点集录接口数据结构
Browse files Browse the repository at this point in the history
  • Loading branch information
toly1994328 committed Sep 10, 2020
1 parent e85ebb8 commit 5707bd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/app/api/issues_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ class IssuesApi {

static Future<Repository> getRepoFlutterUnit() async{
var rep = await dio.get('/repository/name/FlutterUnit');
var repoStr = rep.data['repositoryData'];
var repoStr = rep.data['data']['repositoryData'];
return Repository.fromJson(json.decode(repoStr));
}

static Future<List<Issue>> getIssues() async {
var res = (await dio.get('/point')).data as List;
var res = (await dio.get('/point')).data['data'] as List;
return res.map((e)=>Issue.fromJson(json.decode(e['pointData']))).toList();
}

static Future<List<IssueComment>> getIssuesComment(int pointId) async {
var res = (await dio.get('/pointComment/$pointId')).data as List;
var res = (await dio.get('/pointComment/$pointId')).data['data'] as List;
return res.map((e)=>IssueComment.fromJson(json.decode(e['pointCommentData']))).toList();
}
}
Expand Down

0 comments on commit 5707bd4

Please sign in to comment.