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) => {
|
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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user