| | |
| | | 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;
|
| | |
| | | }
|
| | | return R.ok();
|
| | | }
|
| | |
|
| | | @PostMapping("register")
|
| | | public R<?> register(@RequestBody RegisterBody registerBody)
|
| | | {
|
| | | // 用户注册
|
| | | sysLoginService.register(registerBody.getUsername(), registerBody.getPassword());
|
| | | return R.ok();
|
| | | }
|
| | | }
|