This commit is contained in:
@@ -38,10 +38,16 @@ public class AuthController {
|
||||
|
||||
/**
|
||||
* 微信登录
|
||||
* @param code 微信授权码
|
||||
* @param nickname 微信昵称(可选)
|
||||
* @param avatar 微信头像URL(可选)
|
||||
*/
|
||||
@PostMapping("/wechat")
|
||||
public Result<Map<String, Object>> wechatLogin(@RequestParam String code) {
|
||||
Map<String, Object> result = authService.wechatLogin(code);
|
||||
public Result<Map<String, Object>> wechatLogin(
|
||||
@RequestParam String code,
|
||||
@RequestParam(required = false) String nickname,
|
||||
@RequestParam(required = false) String avatar) {
|
||||
Map<String, Object> result = authService.wechatLogin(code, nickname, avatar);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user