api/clan: rename 'update_clan_meta' -> 'set_clan_details'

This commit is contained in:
Johannes Kirschbauer
2025-07-07 12:51:32 +02:00
parent 7c4865e8b0
commit e1ea44a2cc
4 changed files with 3 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ const EditClanForm = (props: EditClanFormProps) => {
const handleSubmit: SubmitHandler<GeneralData> = async (values, event) => { const handleSubmit: SubmitHandler<GeneralData> = async (values, event) => {
await toast.promise( await toast.promise(
(async () => { (async () => {
await callApi("update_clan_meta", { await callApi("set_clan_details", {
options: { options: {
flake: { identifier: props.directory }, flake: { identifier: props.directory },
meta: values, meta: values,

View File

@@ -23,7 +23,7 @@ const EditClanForm = (props: EditClanFormProps) => {
const handleSubmit: SubmitHandler<GeneralData> = async (values, event) => { const handleSubmit: SubmitHandler<GeneralData> = async (values, event) => {
await toast.promise( await toast.promise(
(async () => { (async () => {
await callApi("update_clan_meta", { await callApi("set_clan_details", {
options: { options: {
flake: { identifier: props.directory }, flake: { identifier: props.directory },
meta: values, meta: values,

View File

@@ -13,7 +13,6 @@ from pathlib import Path
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
from typing import IO, Any from typing import IO, Any
from clan_lib.api import API
from clan_lib.cmd import Log, RunOpts, run from clan_lib.cmd import Log, RunOpts, run
from clan_lib.dirs import user_config_dir from clan_lib.dirs import user_config_dir
from clan_lib.errors import ClanError from clan_lib.errors import ClanError

View File

@@ -14,7 +14,7 @@ class UpdateOptions:
@API.register @API.register
def update_clan_meta(options: UpdateOptions) -> InventorySnapshot: def set_clan_details(options: UpdateOptions) -> InventorySnapshot:
inventory_store = InventoryStore(options.flake) inventory_store = InventoryStore(options.flake)
inventory = inventory_store.read() inventory = inventory_store.read()
set_value_by_path(inventory, "meta", options.meta) set_value_by_path(inventory, "meta", options.meta)