mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 09:25:47 +01:00
Fix unused function and enable user count check in
getServerSideProps
This commit is contained in:
@@ -141,6 +141,3 @@ export const openDockerSelectBoardModal = (innerProps: InnerProps) => {
|
||||
});
|
||||
umami.track('Add to homarr modal');
|
||||
};
|
||||
function uuidv4(): any {
|
||||
throw new Error('Function not implemented.');
|
||||
}
|
||||
|
||||
@@ -81,12 +81,12 @@ export default function OnboardPage({
|
||||
}
|
||||
|
||||
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||
// const userCount = await getTotalUserCountAsync();
|
||||
// if (userCount >= 1) {
|
||||
// return {
|
||||
// notFound: true,
|
||||
// };
|
||||
// }
|
||||
const userCount = await getTotalUserCountAsync();
|
||||
if (userCount >= 1) {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
const files = fs.readdirSync('./data/configs').filter((file) => file.endsWith('.json'));
|
||||
const configs = files.map((file) => getConfig(file));
|
||||
|
||||
Reference in New Issue
Block a user