feat(user): implement user update functionality and enhance verification page UI

This commit is contained in:
2025-07-14 21:37:51 +05:00
parent 780239dbbe
commit 8fac07bb60
5 changed files with 276 additions and 25 deletions

View File

@ -29,3 +29,20 @@ export async function getUsers(params: ParamProps) {
return handleApiResponse<ApiResponse<UserProfile>>(response, "getUsers");
}
export async function getProfileById(userId: string) {
const session = await getServerSession(authOptions);
const response = await fetch(
`${process.env.SARLINK_API_BASE_URL}/api/auth/users/${userId}/`,
{
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Token ${session?.apiToken}`,
},
},
);
return handleApiResponse<UserProfile>(response, "getProfilebyId");
}