From b913ec36ef9001f3e0ae9fd36ac8056f6b72165a Mon Sep 17 00:00:00 2001 From: APLS Date: Mon, 23 Mar 2020 01:10:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/qyi/e5/outlook/controller/OutlookController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/qyi/e5/outlook/controller/OutlookController.java b/src/main/java/io/qyi/e5/outlook/controller/OutlookController.java index f945f99..3a3a754 100644 --- a/src/main/java/io/qyi/e5/outlook/controller/OutlookController.java +++ b/src/main/java/io/qyi/e5/outlook/controller/OutlookController.java @@ -29,16 +29,16 @@ public class OutlookController { @PostMapping("/save") public Result save(@RequestParam String client_id, @RequestParam String client_secret) { UsernamePasswordAuthenticationToken authentication = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); - if (outlookService.save(client_id, client_secret,authentication.getGithub_id())) { + if (outlookService.save(client_id, client_secret, authentication.getGithub_id())) { return ResultUtil.success(); } return ResultUtil.error(ResultEnum.UNKNOWN_ERROR); } @PostMapping("/saveRandomTime") - public Result saveRandomTime(@RequestParam int cronTime,@RequestParam int crondomTime) { + public Result saveRandomTime(@RequestParam int cronTime, @RequestParam int crondomTime) { UsernamePasswordAuthenticationToken authentication = (UsernamePasswordAuthenticationToken) SecurityContextHolder.getContext().getAuthentication(); - if (outlookService.saveRandomTime(cronTime,0,0)) { + if (outlookService.saveRandomTime(authentication.getGithub_id(), cronTime, 0, 0)) { return ResultUtil.success(); } return ResultUtil.error(ResultEnum.UNKNOWN_ERROR);