-
-
Save vrajdesai78/150d1f1a325c2da3f92fc0a400ffcba3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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