29 lines
407 B
TypeScript
29 lines
407 B
TypeScript
|
|
import { useDataStore } from "~/stores/data"
|
|
|
|
export const useUsers = (
|
|
id: string | number,
|
|
) => {
|
|
|
|
const dataStore = useDataStore()
|
|
const toast = useToast()
|
|
const router = useRouter()
|
|
|
|
const getProfile = async () => {
|
|
|
|
|
|
const res = await useNuxtApp().$api(`/api/profiles/${id}`, {
|
|
method: "GET"
|
|
})
|
|
|
|
return res
|
|
}
|
|
|
|
return {getProfile}
|
|
}
|
|
|
|
|
|
|
|
|
|
|