mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-29 06:11:59 +08:00

* feat: support multi ingestion keys * fix: remove unwanted changes * feat: limits ui * feat: handle limit updates from component * feat: handle limit updates per signal * feat: integrate multiple ingestion key api * feat: handle crud for limits * fix: lint errors * feat: support query search for ingestion name * feat: show utilized size in limits * feat: show multiple ingestions ui only if gateway is enabled * feat: handle decimal values for ingestion size * feat: enable multiple ingestion keys for all users with gateway enabled * chore: remove yarn.lock --------- Co-authored-by: Yunus A M <younix@Yunuss-MacBook-Pro.local> Co-authored-by: Prashant Shahi <prashant@signoz.io>
27 lines
745 B
TypeScript
27 lines
745 B
TypeScript
import { GatewayApiV1Instance } from 'api';
|
|
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
|
|
import { AxiosError } from 'axios';
|
|
import { ErrorResponse, SuccessResponse } from 'types/api';
|
|
import { AllIngestionKeyProps } from 'types/api/ingestionKeys/types';
|
|
|
|
const deleteLimitsForIngestionKey = async (
|
|
id: string,
|
|
): Promise<SuccessResponse<AllIngestionKeyProps> | ErrorResponse> => {
|
|
try {
|
|
const response = await GatewayApiV1Instance.delete(
|
|
`/workspaces/me/limits/${id}`,
|
|
);
|
|
|
|
return {
|
|
statusCode: 200,
|
|
error: null,
|
|
message: response.data.status,
|
|
payload: response.data.data,
|
|
};
|
|
} catch (error) {
|
|
return ErrorResponseHandler(error as AxiosError);
|
|
}
|
|
};
|
|
|
|
export default deleteLimitsForIngestionKey;
|