api/clan: rename 'show_clan_meta' -> 'get_clan_details'
This commit is contained in:
@@ -13,7 +13,7 @@ export const clanMetaQuery = (uri: string | undefined = undefined) =>
|
||||
queryFn: async () => {
|
||||
console.log("fetching clan meta", clanURI);
|
||||
|
||||
const result = await callApi("show_clan_meta", {
|
||||
const result = await callApi("get_clan_details", {
|
||||
flake: { identifier: clanURI! },
|
||||
}).promise;
|
||||
|
||||
|
||||
@@ -203,6 +203,6 @@ export const CreateClan = () => {
|
||||
};
|
||||
|
||||
type Meta = Extract<
|
||||
OperationResponse<"show_clan_meta">,
|
||||
OperationResponse<"get_clan_details">,
|
||||
{ status: "success" }
|
||||
>["data"];
|
||||
|
||||
@@ -128,7 +128,7 @@ const EditClanForm = (props: EditClanFormProps) => {
|
||||
);
|
||||
};
|
||||
|
||||
type GeneralData = SuccessQuery<"show_clan_meta">["data"];
|
||||
type GeneralData = SuccessQuery<"get_clan_details">["data"];
|
||||
|
||||
export const ClanDetails = () => {
|
||||
const params = useParams();
|
||||
|
||||
@@ -100,7 +100,7 @@ export const Flash = () => {
|
||||
const deviceQuery = createQuery(() => ({
|
||||
queryKey: ["block_devices"],
|
||||
queryFn: async () => {
|
||||
const result = await callApi("show_block_devices", {}).promise;
|
||||
const result = await callApi("list_block_devices", {}).promise;
|
||||
if (result.status === "error") throw new Error("Failed to fetch data");
|
||||
return result.data;
|
||||
},
|
||||
|
||||
@@ -13,7 +13,7 @@ export const clanMetaQuery = (uri: string | undefined = undefined) =>
|
||||
queryFn: async () => {
|
||||
console.log("fetching clan meta", clanURI);
|
||||
|
||||
const result = await callApi("show_clan_meta", {
|
||||
const result = await callApi("get_clan_details", {
|
||||
flake: { identifier: clanURI! },
|
||||
}).promise;
|
||||
|
||||
|
||||
@@ -202,6 +202,6 @@ export const CreateClan = () => {
|
||||
};
|
||||
|
||||
type Meta = Extract<
|
||||
OperationResponse<"show_clan_meta">,
|
||||
OperationResponse<"get_clan_details">,
|
||||
{ status: "success" }
|
||||
>["data"];
|
||||
|
||||
@@ -128,7 +128,7 @@ const EditClanForm = (props: EditClanFormProps) => {
|
||||
);
|
||||
};
|
||||
|
||||
type GeneralData = SuccessQuery<"show_clan_meta">["data"];
|
||||
type GeneralData = SuccessQuery<"get_clan_details">["data"];
|
||||
|
||||
export const ClanDetails = () => {
|
||||
const params = useParams();
|
||||
|
||||
Reference in New Issue
Block a user