From af1b557bc8db65b45390aa4895fe2b6fc3445b28 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Tue, 12 Oct 2021 09:01:05 +0800
Subject: [PATCH] 若依 3.2.0
---
ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java
index b90c800..3e2361d 100644
--- a/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java
+++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java
@@ -7,6 +7,7 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.auth.form.LoginBody;
+import com.ruoyi.auth.form.RegisterBody;
import com.ruoyi.auth.service.SysLoginService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
@@ -63,4 +64,12 @@
}
return R.ok();
}
+
+ @PostMapping("register")
+ public R<?> register(@RequestBody RegisterBody registerBody)
+ {
+ // 用户注册
+ sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
+ return R.ok();
+ }
}
--
Gitblit v1.9.3