Skip to content

Commit

Permalink
⬆️ upgrade blade
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Jun 30, 2018
1 parent c2a4b48 commit 3b88873
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
Binary file removed bin/tale-cli
Binary file not shown.
4 changes: 0 additions & 4 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
<directory>src/main/plugins/</directory>
<outputDirectory>/plugins</outputDirectory>
</fileSet>
<fileSet>
<directory>bin/</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>

<dependencySets>
Expand Down
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@

<groupId>io.github.otale</groupId>
<artifactId>tale</artifactId>
<version>letast</version>
<version>latest</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sqlite.version>3.21.0.1</sqlite.version>
<blade-mvc.version>2.0.8-SNAPSHOT</blade-mvc.version>
<anima.version>0.2.3-SNAPSHOT</anima.version>
<blade-mvc.version>2.0.9.ALPHA1</blade-mvc.version>
<anima.version>0.2.3</anima.version>
<blade-tpl.verion>0.1.3</blade-tpl.verion>
<blade-validator>0.0.2</blade-validator>
<commonmark.version>0.11.0</commonmark.version>
<rome.version>1.0</rome.version>
<emoji.version>4.0.0</emoji.version>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tale/controller/admin/PagesController.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ public String commonPage(@PathParam String module, @PathParam String page) {
}

@GetRoute("/article/edit/:cid")
public String editArticle() {
public String editArticle(@PathParam String cid) {
return "admin/article/edit.html";
}

@GetRoute("/page/edit/:cid")
public String editPage() {
public String editPage(@PathParam String cid) {
return "admin/page/edit.html";
}

Expand Down
18 changes: 9 additions & 9 deletions src/main/java/com/tale/hooks/BaseWebHook.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.blade.ioc.annotation.Bean;
import com.blade.kit.DateKit;
import com.blade.mvc.hook.Signature;
import com.blade.mvc.RouteContext;
import com.blade.mvc.hook.WebHook;
import com.blade.mvc.http.Request;
import com.blade.mvc.http.Response;
Expand All @@ -20,9 +20,9 @@
public class BaseWebHook implements WebHook {

@Override
public boolean before(Signature signature) {
Request request = signature.request();
Response response = signature.response();
public boolean before(RouteContext context) {
Request request = context.request();
Response response = context.response();

String uri = request.uri();
String ip = request.address();
Expand Down Expand Up @@ -51,16 +51,16 @@ public boolean before(Signature signature) {
}

@Override
public boolean after(Signature signature) {
public boolean after(RouteContext context) {
if(null != TaleUtils.getLoginUser()){
SysLog sysLog = signature.getAction().getAnnotation(SysLog.class);
SysLog sysLog = context.routeAction().getAnnotation(SysLog.class);
if (null != sysLog) {
Logs logs = new Logs();
logs.setAction(sysLog.value());
logs.setAuthorId(TaleUtils.getLoginUser().getUid());
logs.setIp(signature.request().address());
if(!signature.request().uri().contains("upload")){
logs.setData(signature.request().bodyToString());
logs.setIp(context.request().address());
if(!context.request().uri().contains("upload")){
logs.setData(context.request().bodyToString());
}
logs.setCreated(DateKit.nowUnix());
logs.save();
Expand Down

0 comments on commit 3b88873

Please sign in to comment.