mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 18:38:36 +08:00
Github: Remove unnecessary braces
This commit is contained in:
@ -41,7 +41,7 @@ class GitHub {
|
|||||||
|
|
||||||
Future<String> _getAccessCode(String authCode) async {
|
Future<String> _getAccessCode(String authCode) async {
|
||||||
var url =
|
var url =
|
||||||
"https://github.com/login/oauth/access_token?client_id=${_clientID}&client_secret=${_clientSecret}&code=${authCode}";
|
"https://github.com/login/oauth/access_token?client_id=$_clientID&client_secret=$_clientSecret&code=$authCode";
|
||||||
|
|
||||||
var response = await http.post(url);
|
var response = await http.post(url);
|
||||||
if (response.statusCode != 200) {
|
if (response.statusCode != 200) {
|
||||||
@ -72,7 +72,7 @@ class GitHub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var url =
|
var url =
|
||||||
"https://api.github.com/user/repos?page=1&per_page=100&access_token=${_accessCode}";
|
"https://api.github.com/user/repos?page=1&per_page=100&access_token=$_accessCode";
|
||||||
|
|
||||||
var response = await http.get(url);
|
var response = await http.get(url);
|
||||||
if (response.statusCode != 200) {
|
if (response.statusCode != 200) {
|
||||||
@ -101,7 +101,7 @@ class GitHub {
|
|||||||
throw "GitHub Access Code Missing";
|
throw "GitHub Access Code Missing";
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = "https://api.github.com/user/repos?access_token=${_accessCode}";
|
var url = "https://api.github.com/user/repos?access_token=$_accessCode";
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'private': true,
|
'private': true,
|
||||||
@ -132,7 +132,7 @@ class GitHub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var url =
|
var url =
|
||||||
"https://api.github.com/repos/$repo/keys?access_token=${_accessCode}";
|
"https://api.github.com/repos/$repo/keys?access_token=$_accessCode";
|
||||||
|
|
||||||
Map<String, dynamic> data = {
|
Map<String, dynamic> data = {
|
||||||
'title': "GitJournal",
|
'title': "GitJournal",
|
||||||
|
Reference in New Issue
Block a user