From df50d47605b46af17aec53ce77f5916c158f90ba Mon Sep 17 00:00:00 2001 From: none Date: Fri, 3 Mar 2023 09:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E4=BF=AE=E6=94=B9api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/login.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/api/login.ts b/src/api/login.ts index e733c8e..43e0290 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -20,4 +20,11 @@ export function logout() { export function getUser() { return client.get("/backend/v1/auth/detail", {}); -} \ No newline at end of file +} + +export function passwordChange(oldPassword: string, newPassword: string) { + return client.put("/backend/v1/auth/password", { + old_password: oldPassword, + new_password: newPassword, + }); +}