refactor:重构SM.MS请求

This commit is contained in:
hackycy
2020-06-27 00:56:35 +08:00
parent ddf74ef3c3
commit d9f64bce9f
5 changed files with 44 additions and 124 deletions

View File

@@ -44,7 +44,7 @@ class GithubApi {
String configStr = await ImageUploadUtils.getPBConfig(PBTypeKeys.github);
if (!isBlank(configStr)) {
GithubConfig config = GithubConfig.fromJson(json.decode(configStr));
if (config != null && config.token != null && config.token != '') {
if (config != null && !isBlank(config.token)) {
return Options(headers: {"Authorization": 'Token ${config.token}'});
}
}