Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
7c3eb1a5
Unverified
Commit
7c3eb1a5
authored
Mar 27, 2019
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
♻
Fix #12738
parent
a8cd4236
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
src/main/java/org/b3log/solo/event/B3ArticleSender.java
src/main/java/org/b3log/solo/event/B3ArticleSender.java
+2
-2
src/main/java/org/b3log/solo/event/B3CommentSender.java
src/main/java/org/b3log/solo/event/B3CommentSender.java
+2
-1
src/main/java/org/b3log/solo/service/ExportService.java
src/main/java/org/b3log/solo/service/ExportService.java
+3
-2
No files found.
src/main/java/org/b3log/solo/event/B3ArticleSender.java
View file @
7c3eb1a5
...
@@ -48,7 +48,7 @@ import org.json.JSONObject;
...
@@ -48,7 +48,7 @@ import org.json.JSONObject;
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="https://hacpai.com/member/armstrong">ArmstrongCN</a>
* @author <a href="https://hacpai.com/member/armstrong">ArmstrongCN</a>
* @version 1.0.2.1
8, Feb 21
, 2019
* @version 1.0.2.1
9, Mar 27
, 2019
* @since 0.3.1
* @since 0.3.1
*/
*/
@Singleton
@Singleton
...
@@ -124,7 +124,7 @@ public class B3ArticleSender extends AbstractEventListener<JSONObject> {
...
@@ -124,7 +124,7 @@ public class B3ArticleSender extends AbstractEventListener<JSONObject> {
put
(
"article"
,
article
).
put
(
"article"
,
article
).
put
(
"client"
,
client
);
put
(
"client"
,
client
);
final
HttpResponse
response
=
HttpRequest
.
post
(
"https://rhythm.b3log.org/api/article"
).
bodyText
(
requestJSONObject
.
toString
()).
final
HttpResponse
response
=
HttpRequest
.
post
(
"https://rhythm.b3log.org/api/article"
).
bodyText
(
requestJSONObject
.
toString
()).
connectionTimeout
(
3000
).
timeout
(
7000
).
connectionTimeout
(
3000
).
timeout
(
7000
).
trustAllCerts
(
true
).
contentTypeJson
().
header
(
"User-Agent"
,
Solos
.
USER_AGENT
).
send
();
contentTypeJson
().
header
(
"User-Agent"
,
Solos
.
USER_AGENT
).
send
();
LOGGER
.
log
(
Level
.
INFO
,
"Pushed an article [title={0}] to Rhy, response [{1}]"
,
title
,
response
.
toString
());
LOGGER
.
log
(
Level
.
INFO
,
"Pushed an article [title={0}] to Rhy, response [{1}]"
,
title
,
response
.
toString
());
...
...
src/main/java/org/b3log/solo/event/B3CommentSender.java
View file @
7c3eb1a5
...
@@ -43,7 +43,7 @@ import org.json.JSONObject;
...
@@ -43,7 +43,7 @@ import org.json.JSONObject;
* This listener is responsible for sending comment to B3log Rhythm. Sees <a href="https://hacpai.com/b3log">B3log 构思</a> for more details.
* This listener is responsible for sending comment to B3log Rhythm. Sees <a href="https://hacpai.com/b3log">B3log 构思</a> for more details.
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.1.
5, Feb 9
, 2019
* @version 1.0.1.
6, Mar 27
, 2019
* @since 0.5.5
* @since 0.5.5
*/
*/
@Singleton
@Singleton
...
@@ -116,6 +116,7 @@ public class B3CommentSender extends AbstractEventListener<JSONObject> {
...
@@ -116,6 +116,7 @@ public class B3CommentSender extends AbstractEventListener<JSONObject> {
put
(
"client"
,
client
);
put
(
"client"
,
client
);
HttpRequest
.
post
(
"https://rhythm.b3log.org/api/comment"
).
bodyText
(
requestJSONObject
.
toString
()).
HttpRequest
.
post
(
"https://rhythm.b3log.org/api/comment"
).
bodyText
(
requestJSONObject
.
toString
()).
connectionTimeout
(
3000
).
timeout
(
7000
).
trustAllCerts
(
true
).
header
(
"User-Agent"
,
Solos
.
USER_AGENT
).
contentTypeJson
().
sendAsync
();
header
(
"User-Agent"
,
Solos
.
USER_AGENT
).
contentTypeJson
().
sendAsync
();
LOGGER
.
log
(
Level
.
DEBUG
,
"Pushed a comment to Sym"
);
LOGGER
.
log
(
Level
.
DEBUG
,
"Pushed a comment to Sym"
);
}
catch
(
final
Exception
e
)
{
}
catch
(
final
Exception
e
)
{
...
...
src/main/java/org/b3log/solo/service/ExportService.java
View file @
7c3eb1a5
...
@@ -53,7 +53,7 @@ import java.util.stream.Collectors;
...
@@ -53,7 +53,7 @@ import java.util.stream.Collectors;
* Export service.
* Export service.
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.1.0.
3, Mar 19
, 2019
* @version 1.1.0.
4, Mar 27
, 2019
* @since 2.5.0
* @since 2.5.0
*/
*/
@Service
@Service
...
@@ -240,7 +240,8 @@ public class ExportService {
...
@@ -240,7 +240,8 @@ public class ExportService {
bodyBuilder
.
append
(
"### 热议\n"
).
append
(
mostCmtBuilder
);
bodyBuilder
.
append
(
"### 热议\n"
).
append
(
mostCmtBuilder
);
}
}
final
HttpResponse
response
=
HttpRequest
.
post
(
"https://hacpai.com/github/repos"
).
connectionTimeout
(
7000
).
timeout
(
60000
).
header
(
"User-Agent"
,
Solos
.
USER_AGENT
).
final
HttpResponse
response
=
HttpRequest
.
post
(
"https://hacpai.com/github/repos"
).
connectionTimeout
(
7000
).
timeout
(
60000
).
trustAllCerts
(
true
).
header
(
"User-Agent"
,
Solos
.
USER_AGENT
).
form
(
"userName"
,
userName
,
form
(
"userName"
,
userName
,
"userB3Key"
,
userB3Ke
,
"userB3Key"
,
userB3Ke
,
"clientName"
,
"Solo"
,
"clientName"
,
"Solo"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment