mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-21 08:21:19 +02:00
Update HttpMethodTag.tsx
This commit is contained in:
@@ -8,6 +8,7 @@ interface Props {
|
|||||||
request: HttpRequest | GrpcRequest | WebsocketRequest;
|
request: HttpRequest | GrpcRequest | WebsocketRequest;
|
||||||
className?: string;
|
className?: string;
|
||||||
short?: boolean;
|
short?: boolean;
|
||||||
|
noAlias?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const methodNames: Record<string, string> = {
|
const methodNames: Record<string, string> = {
|
||||||
@@ -24,9 +25,9 @@ const methodNames: Record<string, string> = {
|
|||||||
websocket: 'WS',
|
websocket: 'WS',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const HttpMethodTag = memo(function HttpMethodTag({ request, className, short }: Props) {
|
export const HttpMethodTag = memo(function HttpMethodTag({ request, className, short, noAlias }: Props) {
|
||||||
const method =
|
const method =
|
||||||
request.model === 'http_request' && request.bodyType === 'graphql'
|
request.model === 'http_request' && (request.bodyType === 'graphql' && !noAlias)
|
||||||
? 'graphql'
|
? 'graphql'
|
||||||
: request.model === 'grpc_request'
|
: request.model === 'grpc_request'
|
||||||
? 'grpc'
|
? 'grpc'
|
||||||
|
|||||||
Reference in New Issue
Block a user