import { CreateCompanyParams, ICompany, MyOranizationsView } from "@models/Company.model";
import ApiRequest from "@services/Api.Service";

export const loadOrganizationsByUser = async (userId: string): Promise<MyOranizationsView[]> => {
    return ApiRequest.post<MyOranizationsView[]>("companies/get-by-user", {
        sessionUser: userId,
    });
};

export const createOrganization = async (data: CreateCompanyParams): Promise<ICompany> => {
    return ApiRequest.post<ICompany>("companies/create", data);
};
