15 lines
446 B
TypeScript
15 lines
446 B
TypeScript
|
|
import type { UpdateProcessInput } from "../../../../common/processes";
|
||
|
|
import { ProcessResponseSchema } from "../../../../common/processes";
|
||
|
|
import { processRequest } from "../../shared/api/process-request";
|
||
|
|
|
||
|
|
export async function updateProcess(
|
||
|
|
company: string,
|
||
|
|
id: string,
|
||
|
|
values: UpdateProcessInput,
|
||
|
|
token: string
|
||
|
|
) {
|
||
|
|
return ProcessResponseSchema.parse(
|
||
|
|
await processRequest(`${company}/${id}/update`, { values }, token)
|
||
|
|
);
|
||
|
|
}
|