New Backend changes
This commit is contained in:
28
composables/useUsers.ts
Normal file
28
composables/useUsers.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
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}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user