api/flash: refactor into 'list_flash_options'

This commit is contained in:
Johannes Kirschbauer
2025-07-06 20:17:13 +02:00
parent f48c596617
commit 9635fb03b7
6 changed files with 29 additions and 24 deletions

View File

@@ -110,7 +110,7 @@ export const Flash = () => {
const keymapQuery = createQuery(() => ({
queryKey: ["list_keymaps"],
queryFn: async () => {
const result = await callApi("list_possible_keymaps", {}).promise;
const result = await callApi("list_keymaps", {}).promise;
if (result.status === "error") throw new Error("Failed to fetch data");
return result.data;
},
@@ -120,7 +120,7 @@ export const Flash = () => {
const langQuery = createQuery(() => ({
queryKey: ["list_languages"],
queryFn: async () => {
const result = await callApi("list_possible_languages", {}).promise;
const result = await callApi("list_languages", {}).promise;
if (result.status === "error") throw new Error("Failed to fetch data");
return result.data;
},