Skip to content

Commit

Permalink
🎨 社区端更名 88250#180
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Sep 3, 2020
1 parent 9ac7987 commit 92c8b15
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/b3log/solo/event/B3ArticleSender.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://hacpai.com/member/armstrong">ArmstrongCN</a>
* @version 1.0.2.26, Jan 22, 2020
* @version 1.0.2.27, Sep 3, 2020
* @since 0.3.1
*/
@Singleton
Expand Down Expand Up @@ -111,7 +111,7 @@ public static void pushArticleToRhy(final JSONObject data) {
put("article", article).
put("client", client);
final HttpResponse response = HttpRequest.post("https://rhythm.b3log.org/api/article").bodyText(requestJSONObject.toString()).
connectionTimeout(3000).timeout(7000).trustAllCerts(true).
connectionTimeout(3000).timeout(7000).trustAllCerts(true).followRedirects(true).
contentTypeJson().header("User-Agent", Solos.USER_AGENT).send();
response.charset("UTF-8");
final JSONObject result = new JSONObject(response.bodyText());
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/b3log/solo/service/ExportService.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* Export service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.2.0.2, Jul 8, 2020
* @version 1.2.0.3, Sep 3, 2020
* @since 2.5.0
*/
@Service
Expand Down Expand Up @@ -378,7 +378,7 @@ public void exportHacPai() {
stat.put("mobileSkin", optionQueryService.getOptionById(Option.ID_C_MOBILE_SKIN_DIR_NAME).optString(Option.OPTION_VALUE));

final HttpResponse response = HttpRequest.post("https://hacpai.com/github/repos").
connectionTimeout(7000).timeout(60000).trustAllCerts(true).header("User-Agent", Solos.USER_AGENT).
connectionTimeout(7000).timeout(60000).trustAllCerts(true).followRedirects(true).header("User-Agent", Solos.USER_AGENT).
form("userName", userName,
"userB3Key", userB3Key,
"clientName", "Solo",
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/b3log/solo/service/UserMgmtService.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://hacpai.com/member/DASHU">DASHU</a>
* @author <a href="https://hacpai.com/member/nanolikeyou">nanolikeyou</a>
* @version 1.1.0.20, Mar 17, 2020
* @version 1.1.0.21, Sep 3, 2020
* @since 0.4.0
*/
@Service
Expand Down Expand Up @@ -117,7 +117,7 @@ public void refreshUSite() {
put("userName", admin.optString(User.USER_NAME)).
put("userB3Key", admin.optString(UserExt.USER_B3_KEY));
requestJSON.put("client", client);
final HttpResponse res = HttpRequest.post("https://hacpai.com/user/usite").trustAllCerts(true).
final HttpResponse res = HttpRequest.post("https://hacpai.com/user/usite").trustAllCerts(true).followRedirects(true).
connectionTimeout(3000).timeout(7000).header("User-Agent", Solos.USER_AGENT).
body(requestJSON.toString()).send();
if (200 != res.statusCode()) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/b3log/solo/util/GitHubs.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* GitHub utilities.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.0.0, May 20, 2020
* @version 1.1.0.1, Sep 3, 2020
* @since 3.0.0
*/
public final class GitHubs {
Expand All @@ -46,7 +46,8 @@ public final class GitHubs {
*/
public static JSONArray getGitHubRepos(final String githubUserId) {
try {
final HttpResponse res = HttpRequest.get("https://hacpai.com/github/repos?id=" + githubUserId).trustAllCerts(true).
final HttpResponse res = HttpRequest.get("https://hacpai.com/github/repos?id=" + githubUserId).
trustAllCerts(true).followRedirects(true).
connectionTimeout(3000).timeout(7000).header("User-Agent", Solos.USER_AGENT).send();
if (200 != res.statusCode()) {
return null;
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/org/b3log/solo/util/Solos.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* Solo utilities.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.11.0.0, Jun 10, 2020
* @version 1.11.0.1, Sep 3, 2020
* @since 2.8.0
*/
public final class Solos {
Expand Down Expand Up @@ -126,7 +126,7 @@ public final class Solos {
public static JSONObject getUserInfo(final String accessToken) {
try {
final HttpResponse res = HttpRequest.post("https://hacpai.com/user/ak").
form("access_token", accessToken).trustAllCerts(true).
form("access_token", accessToken).trustAllCerts(true).followRedirects(true).
connectionTimeout(3000).timeout(7000).header("User-Agent", Solos.USER_AGENT).send();
if (200 != res.statusCode()) {
return null;
Expand All @@ -153,7 +153,8 @@ public static JSONObject getUserInfo(final String accessToken) {
*/
public static void reloadBlacklistIPs() {
try {
final HttpResponse res = HttpRequest.get("https://hacpai.com/apis/blacklist/ip").trustAllCerts(true).
final HttpResponse res = HttpRequest.get("https://hacpai.com/apis/blacklist/ip").
trustAllCerts(true).followRedirects(true).
connectionTimeout(3000).timeout(7000).header("User-Agent", Solos.USER_AGENT).send();
if (200 != res.statusCode()) {
return;
Expand Down Expand Up @@ -241,7 +242,7 @@ public static JSONObject getUploadToken(final RequestContext context) {
}

final JSONObject requestJSON = new JSONObject().put(User.USER_NAME, userName).put(UserExt.USER_B3_KEY, userB3Key);
final HttpResponse res = HttpRequest.post("https://hacpai.com/apis/upload/token").trustAllCerts(true).
final HttpResponse res = HttpRequest.post("https://hacpai.com/apis/upload/token").trustAllCerts(true).followRedirects(true).
body(requestJSON.toString()).connectionTimeout(3000).timeout(7000).header("User-Agent", Solos.USER_AGENT).send();
uploadTokenCheckTime = now;
if (200 != res.statusCode()) {
Expand Down

0 comments on commit 92c8b15

Please sign in to comment.