api/clan: rename 'update_clan_meta' -> 'set_clan_details'
This commit is contained in:
@@ -23,7 +23,7 @@ const EditClanForm = (props: EditClanFormProps) => {
|
||||
const handleSubmit: SubmitHandler<GeneralData> = async (values, event) => {
|
||||
await toast.promise(
|
||||
(async () => {
|
||||
await callApi("update_clan_meta", {
|
||||
await callApi("set_clan_details", {
|
||||
options: {
|
||||
flake: { identifier: props.directory },
|
||||
meta: values,
|
||||
|
||||
@@ -23,7 +23,7 @@ const EditClanForm = (props: EditClanFormProps) => {
|
||||
const handleSubmit: SubmitHandler<GeneralData> = async (values, event) => {
|
||||
await toast.promise(
|
||||
(async () => {
|
||||
await callApi("update_clan_meta", {
|
||||
await callApi("set_clan_details", {
|
||||
options: {
|
||||
flake: { identifier: props.directory },
|
||||
meta: values,
|
||||
|
||||
@@ -13,7 +13,6 @@ from pathlib import Path
|
||||
from tempfile import NamedTemporaryFile
|
||||
from typing import IO, Any
|
||||
|
||||
from clan_lib.api import API
|
||||
from clan_lib.cmd import Log, RunOpts, run
|
||||
from clan_lib.dirs import user_config_dir
|
||||
from clan_lib.errors import ClanError
|
||||
|
||||
@@ -14,7 +14,7 @@ class UpdateOptions:
|
||||
|
||||
|
||||
@API.register
|
||||
def update_clan_meta(options: UpdateOptions) -> InventorySnapshot:
|
||||
def set_clan_details(options: UpdateOptions) -> InventorySnapshot:
|
||||
inventory_store = InventoryStore(options.flake)
|
||||
inventory = inventory_store.read()
|
||||
set_value_by_path(inventory, "meta", options.meta)
|
||||
|
||||
Reference in New Issue
Block a user