Merge pull request 'api/tasks: prefix impure actions with run' (#4239) from api-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4239
This commit is contained in:
@@ -75,7 +75,7 @@ export const MachineListItem = (props: MachineListItemProps) => {
|
||||
}
|
||||
|
||||
setInstalling(true);
|
||||
await callApi("install_machine", {
|
||||
await callApi("run_machine_install", {
|
||||
opts: {
|
||||
machine: {
|
||||
name: name,
|
||||
@@ -163,7 +163,7 @@ export const MachineListItem = (props: MachineListItemProps) => {
|
||||
}
|
||||
|
||||
await callApi(
|
||||
"deploy_machine",
|
||||
"run_machine_deploy",
|
||||
{
|
||||
machine: {
|
||||
name: name,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -157,7 +157,7 @@ export const Flash = () => {
|
||||
console.log("Confirmed flash:", values);
|
||||
try {
|
||||
await toast.promise(
|
||||
callApi("flash_machine", {
|
||||
callApi("run_machine_flash", {
|
||||
machine: {
|
||||
name: values.machine.devicePath,
|
||||
flake: {
|
||||
|
||||
@@ -120,7 +120,7 @@ export function InstallMachine(props: InstallMachineProps) {
|
||||
throw new Error("No target host found for the machine");
|
||||
}
|
||||
|
||||
const installPromise = callApi("install_machine", {
|
||||
const installPromise = callApi("run_machine_install", {
|
||||
opts: {
|
||||
machine: {
|
||||
name: props.name,
|
||||
|
||||
@@ -149,7 +149,7 @@ export function MachineForm(props: MachineFormProps) {
|
||||
|
||||
setIsUpdating(true);
|
||||
const r = await callApi(
|
||||
"deploy_machine",
|
||||
"run_machine_deploy",
|
||||
{
|
||||
machine: {
|
||||
name: machine,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user