feat: add utilities to fetch guild member and instance user

This commit is contained in:
SauceyRed 2025-05-27 01:45:33 +02:00
parent 68292b4e78
commit cc36fc1912
Signed by: sauceyred
GPG key ID: 2BF92EB6D8A5CCA7
2 changed files with 12 additions and 0 deletions

6
utils/fetchUser.ts Normal file
View file

@ -0,0 +1,6 @@
import type { UserResponse } from "~/types/interfaces"
export default async (serverId: string, userId: string): Promise<UserResponse> => {
const user = await fetchWithApi(`/users/${userId}`) as UserResponse;
return user;
}