frontend/utils/fetchMember.ts

6 lines
251 B
TypeScript

import type { UserResponse } from "~/types/interfaces"
export default async (serverId: string, memberId: string): Promise<UserResponse> => {
const user = await fetchWithApi(`/guilds/${serverId}/members/${memberId}`) as UserResponse;
return user;
}