mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-07-15 21:03:21 +00:00
feat(user): implement user update functionality and enhance verification page UI ✨
This commit is contained in:
@ -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");
|
||||
}
|
Reference in New Issue
Block a user