Skip to content

Commit

Permalink
Updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
archsh committed Sep 12, 2023
1 parent 409e974 commit 7a90ab3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import plus.extvos.common.annotation.Limit;
import plus.extvos.common.exception.ResultException;
import plus.extvos.common.i18n.LocaleMessage;
import plus.extvos.common.utils.RequestContext;
import plus.extvos.example.service.ExampleService;
import plus.extvos.logging.annotation.Log;
import plus.extvos.mqtt.annotation.Payload;
Expand Down Expand Up @@ -98,9 +99,10 @@ public Result<?> exampleByNum(@PathVariable int num,
@GetMapping("/example/by/user")
public Result<?> exampleByUser(@SessionUser String username, @RemoteAddress String remoteIp, @UserAgent String ua) {
Map<String, Object> m = new HashMap<>();
RequestContext ctx = RequestContext.probe();
m.put("SessionUser", username);
m.put("RemoteAddress", remoteIp);
m.put("UserAgent", ua);
m.put("RemoteAddress", ctx.getIpAddress());
m.put("UserAgent", ctx.getBrowser());
return Result.data(m).success();
}

Expand Down
2 changes: 1 addition & 1 deletion quick-lib-common

0 comments on commit 7a90ab3

Please sign in to comment.