feat: add note module and route fixes

This commit is contained in:
nepiedg
2026-04-17 07:48:44 +00:00
parent 866ddb046b
commit 84e1c0daac
25 changed files with 2196 additions and 38 deletions
+4 -10
View File
@@ -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']
);