Skip to content

Commit

Permalink
Merge pull request #34 from LoCyan-Team/v2-email
Browse files Browse the repository at this point in the history
[*] 尝试修复重置密码
  • Loading branch information
Muska-Ami authored Oct 18, 2024
2 parents a874c22 + ffaf043 commit b0d838b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/api/v2/user/password.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { post } from '@/utils/request'

const password = async (
username: string,
old_password: string | null,
old_password: string | undefined,
new_password: string,
verify_code: string | null
verify_code: string | undefined
) => {
const rs = await post(`${base.api_v2_url}/user/password`, {
username: username,
Expand Down
2 changes: 1 addition & 1 deletion src/components/UserInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ async function changePassword() {
}
let rs
try {
rs = await api.v2.user.password(data.username, data.oldPassword, data.newPassword, null)
rs = await api.v2.user.password(data.username, data.oldPassword, data.newPassword, undefined)
} catch (e) {
logger.error(e)
tPassword.value.isLoading = false
Expand Down
2 changes: 1 addition & 1 deletion src/views/auth/ResetPasswordView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async function doResetRequest() {
try {
rs = await api.v2.user.password(
model.value.username,
null,
undefined,
model.value.password,
model.value.verifyCode
)
Expand Down

0 comments on commit b0d838b

Please sign in to comment.