Fix unused function and enable user count check in

getServerSideProps
This commit is contained in:
Thomas Camlong
2023-12-02 12:41:07 +01:00
parent 48ca5352c9
commit deee511f86
2 changed files with 6 additions and 9 deletions

View File

@@ -141,6 +141,3 @@ export const openDockerSelectBoardModal = (innerProps: InnerProps) => {
}); });
umami.track('Add to homarr modal'); umami.track('Add to homarr modal');
}; };
function uuidv4(): any {
throw new Error('Function not implemented.');
}

View File

@@ -81,12 +81,12 @@ export default function OnboardPage({
} }
export const getServerSideProps: GetServerSideProps = async (ctx) => { export const getServerSideProps: GetServerSideProps = async (ctx) => {
// const userCount = await getTotalUserCountAsync(); const userCount = await getTotalUserCountAsync();
// if (userCount >= 1) { if (userCount >= 1) {
// return { return {
// notFound: true, notFound: true,
// }; };
// } }
const files = fs.readdirSync('./data/configs').filter((file) => file.endsWith('.json')); const files = fs.readdirSync('./data/configs').filter((file) => file.endsWith('.json'));
const configs = files.map((file) => getConfig(file)); const configs = files.map((file) => getConfig(file));