mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-03 22:00:52 +08:00

* refactor: remove the dependency of services using redux * refactor: seperated columns and unit test case * refactor: move the constant to other file * refactor: updated test case * refactor: removed the duplicate enum * fix: removed the inline function * fix: removed the inline function * refactor: removed the magic string * fix: change the name from matrics to metrics * fix: one on one mapping of props * refactor: created a hook to getting services through api call * fix: linter error * refactor: renamed the file according to functionality * refactor: renamed more file according to functionality * refactor: removed unwanted interfaces and renamed files * refactor: separated types * refactor: shifted mock data and completed review changes * chore: updated test cases * refactor: added useEffect in errornotification * chore: updated service test * chore: shifted loading to table level * chore: updated test cases --------- Co-authored-by: Vishal Sharma <makeavish786@gmail.com>
14 lines
349 B
TypeScript
14 lines
349 B
TypeScript
import axios from 'api';
|
|
import { PayloadProps, Props } from 'types/api/metrics/getService';
|
|
|
|
const getService = async (props: Props): Promise<PayloadProps> => {
|
|
const response = await axios.post(`/services`, {
|
|
start: `${props.start}`,
|
|
end: `${props.end}`,
|
|
tags: props.selectedTags,
|
|
});
|
|
return response.data;
|
|
};
|
|
|
|
export default getService;
|