File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/main/java/net/cofcool/sourcebox Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 6
6
import lombok .CustomLog ;
7
7
import net .cofcool .sourcebox .internal .simplenote .entity .Note ;
8
8
import net .cofcool .sourcebox .util .SqlRepository ;
9
+ import org .apache .commons .lang3 .StringUtils ;
9
10
10
11
@ CustomLog
11
12
public class NoteService {
@@ -18,7 +19,7 @@ public NoteService(Vertx vertx) {
18
19
19
20
public Future <Note > save (Note note ) {
20
21
var n = note ;
21
- if (n .id () == null ) {
22
+ if (StringUtils . isBlank ( n .id ()) ) {
22
23
n = Note .init (n .content ());
23
24
}
24
25
return noteRepository .save (n );
Original file line number Diff line number Diff line change @@ -167,13 +167,13 @@ private Router build(Credentials credentials) {
167
167
r .body ().asJsonObject ()
168
168
.forEach (e -> args .arg (e .getKey (), (String ) e .getValue ()));
169
169
var webToolContext = contextSupplier .apply (tool );
170
- args .copyConfigFrom (tool . config ( ))
171
- .copyConfigFrom (globalConfig . removePrefix ( toolName ))
170
+ args .copyConfigFrom (globalConfig . removePrefix ( toolName ))
171
+ .copyConfigFrom (tool . config ( ))
172
172
.context (webToolContext );
173
173
174
174
vertx .executeBlocking (() -> {
175
175
tool .run (args );
176
- return Future .succeededFuture (webToolContext . toObject () );
176
+ return Future .succeededFuture ("success" );
177
177
})
178
178
.onSuccess (a ->
179
179
EVENT_QUEUE .offer (new ActionEvent (a .result (), toolName , "finished" )))
You can’t perform that action at this time.
0 commit comments