UNPKG

@ozanmanav/react-native-boilerplate-ts

Version:

TheCodingMachine React Native Boilerplate With Typescript

10 lines (8 loc) 247 B
import api, { handleError } from '@/Services' export default async (userId: string) => { if (!userId) { return handleError({ message: 'User ID is required' }) } const response = await api.get(`users/${userId}`) return response.data }