mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-21 00:49:17 +01:00
Fix xpath filtering
This commit is contained in:
@@ -22,7 +22,7 @@ export function useCreateHttpRequest() {
|
||||
if (patch.sortPriority === undefined) {
|
||||
if (activeRequest != null) {
|
||||
// Place above currently-active request
|
||||
patch.sortPriority = activeRequest.sortPriority + 0.0001;
|
||||
patch.sortPriority = activeRequest.sortPriority - 0.0001;
|
||||
} else {
|
||||
// Place at the very top
|
||||
patch.sortPriority = -Date.now();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import type { JsonValue } from '@yaakapp/api/lib/gen/serde_json/JsonValue';
|
||||
import type { FilterResponse } from '@yaakapp/api';
|
||||
import { invokeCmd } from '../lib/tauri';
|
||||
|
||||
export function useFilterResponse({
|
||||
@@ -16,8 +16,12 @@ export function useFilterResponse({
|
||||
return null;
|
||||
}
|
||||
|
||||
const items = (await invokeCmd('cmd_filter_response', { responseId, filter })) as JsonValue[];
|
||||
return JSON.stringify(items, null, 2);
|
||||
const result = (await invokeCmd('cmd_filter_response', {
|
||||
responseId,
|
||||
filter,
|
||||
})) as FilterResponse;
|
||||
|
||||
return result.content;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user