Skip to content

Commit

Permalink
fix: correct invalid export csv url
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaOloton committed Aug 27, 2024
1 parent ac00546 commit 25313a3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import axios from "axios";

import { getApiUrl } from "~/actions/getApiUrl";
import { useSession } from "next-auth/react";

export const exportMembersEndpoint = async (format: string = "csv") => {
const apiUrl = await getApiUrl();
const { data: session } = useSession();
if (!session?.currentOrgId) return;
try {
const response = await axios.get(
`${apiUrl}/api/v1/organisation/members/export`,
`${apiUrl}/api/v1/organisations/${session?.currentOrgId}/users/export`,
{
params: {
format: format,
Expand Down

0 comments on commit 25313a3

Please sign in to comment.