Skip to content

Instantly share code, notes, and snippets.

@vrajdesai78
Created June 20, 2023 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrajdesai78/150d1f1a325c2da3f92fc0a400ffcba3 to your computer and use it in GitHub Desktop.
Save vrajdesai78/150d1f1a325c2da3f92fc0a400ffcba3 to your computer and use it in GitHub Desktop.
export const getServerSideProps: GetServerSideProps<{
roomId: string;
}> = async () => {
const { data } = await axios.post(
'https://api.huddle01.com/api/v1/create-room',
{
title: 'Huddle01-SDK-Test',
roomLock: false,
},
{
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.API_KEY,
},
}
);
return {
props: {
roomId: data.roomId,
},
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment