mirror of
https://github.com/dsoaress/link-free.git
synced 2026-08-17 15:06:06 +01:00
13 lines
266 B
TypeScript
13 lines
266 B
TypeScript
|
|
import type { User } from '@prisma/client'
|
||
|
|
|
||
|
|
import { api } from '../services/api'
|
||
|
|
|
||
|
|
export async function retrieveUser() {
|
||
|
|
try {
|
||
|
|
const { data } = await api.get<Omit<User, 'password'>>('users/me')
|
||
|
|
return data
|
||
|
|
} catch (error) {
|
||
|
|
console.log(error)
|
||
|
|
}
|
||
|
|
}
|