From eb3ebc27453cd6729bbfd70a076fca18d57ad03f Mon Sep 17 00:00:00 2001 From: carry <2641257231@qq.com> Date: Fri, 14 Feb 2025 17:51:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9B=B4=E6=96=B0api?= =?UTF-8?q?=E7=9A=84=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/userService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/api/userService.ts b/src/api/userService.ts index 7dda43e..59293c8 100644 --- a/src/api/userService.ts +++ b/src/api/userService.ts @@ -23,5 +23,10 @@ export const userService = { async deleteUser(userId: number): Promise { await apiClient.delete(`${API_BASE_URL}/${userId}`); + }, + + async getUser(userId: number): Promise { + const response = await apiClient.get(`${API_BASE_URL}/${userId}`); + return response.data; } }; \ No newline at end of file