feat: add note module and route fixes
This commit is contained in:
@@ -117,12 +117,9 @@ class Auth extends BaseController
|
||||
public function me()
|
||||
{
|
||||
try {
|
||||
$payload = $this->request->payload ?? null;
|
||||
if (!$payload) {
|
||||
return Response::error('未登录', 401);
|
||||
}
|
||||
$userid = $this->getLoginUserId();
|
||||
|
||||
$result = $this->authService->getUserInfo($payload['userid']);
|
||||
$result = $this->authService->getUserInfo($userid);
|
||||
|
||||
return Response::success($result);
|
||||
} catch (\Exception $e) {
|
||||
@@ -146,10 +143,7 @@ class Auth extends BaseController
|
||||
public function password()
|
||||
{
|
||||
try {
|
||||
$payload = $this->request->payload ?? null;
|
||||
if (!$payload) {
|
||||
return Response::error('未登录', 401);
|
||||
}
|
||||
$userid = $this->getLoginUserId();
|
||||
|
||||
$data = $this->request->post();
|
||||
|
||||
@@ -164,7 +158,7 @@ class Auth extends BaseController
|
||||
])->check($data);
|
||||
|
||||
$this->authService->changePassword(
|
||||
$payload['userid'],
|
||||
$userid,
|
||||
$data['old_password'],
|
||||
$data['new_password']
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user