quivr/frontend/lib/api/onboarding/onboarding.ts
2023-10-10 09:27:35 +02:00

17 lines
479 B
TypeScript

import { AxiosInstance } from "axios";
import { Onboarding } from "@/lib/types/Onboarding";
export const getOnboarding = async (
axiosInstance: AxiosInstance
): Promise<Onboarding> => {
return (await axiosInstance.get<Onboarding>("/onboarding")).data;
};
export const updateOnboarding = async (
onboarding: Partial<Onboarding>,
axiosInstance: AxiosInstance
): Promise<Onboarding> => {
return (await axiosInstance.put<Onboarding>("/onboarding", onboarding)).data;
};