mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-12 13:21:26 +08:00

* chore(api): update the api folder structure according to rest principles * chore(api): update the api folder structure according to rest principles
19 lines
435 B
TypeScript
19 lines
435 B
TypeScript
import axios from 'api';
|
|
import { ErrorResponse, SuccessResponse } from 'types/api';
|
|
import { PayloadProps, Props } from 'types/api/user/getUser';
|
|
|
|
const getUser = async (
|
|
props: Props,
|
|
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
|
|
const response = await axios.get(`/user/${props.userId}`);
|
|
|
|
return {
|
|
statusCode: 200,
|
|
error: null,
|
|
message: 'Success',
|
|
payload: response.data,
|
|
};
|
|
};
|
|
|
|
export default getUser;
|