From 80a82efcb42ba4b6f24768e780b1b3f51e3141f4 Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 10 二月 2025 08:01:26 +0800
Subject: [PATCH] #

---
 rsf-server/src/main/java/com/vincent/rsf/server/system/controller/AuthController.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/AuthController.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/AuthController.java
index 7e7c009..7639897 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/AuthController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/AuthController.java
@@ -106,9 +106,9 @@
     }
 
     @OperationLog("Reset Password")
-    @PostMapping("/auth/password")
+    @PostMapping("/auth/reset/password")
     public R resetPassword(@RequestBody UpdatePasswordParam param) {
-        if (Cools.isEmpty(param.getOldPassword(), param.getPassword())) {
+        if (Cools.isEmpty(param.getOldPassword(), param.getNewPassword())) {
             return R.error("Parameters Cannot Be Empty");
         }
         Long userId = getLoginUserId();
@@ -116,15 +116,15 @@
             return R.error("Please Login First");
         }
         if (!userService.comparePassword(userService.getById(userId).getPassword(), param.getOldPassword())) {
-            return R.error("The Origin Password Was Incorrect");
+            return R.parse("408-The Current Password Was Incorrect");
         }
         User user = new User();
         user.setId(userId);
-        user.setPassword(userService.encodePassword(param.getPassword()));
+        user.setPassword(userService.encodePassword(param.getNewPassword()));
         if (userService.updateById(user)) {
-            return R.ok("Update Success");
+            return R.ok("Reset Password Success");
         }
-        return R.error("Update Fail");
+        return R.error("Reset Password Fail");
     }
 
 

--
Gitblit v1.9.1