Refactor Docker integration in board page

This commit is contained in:
ajnart
2023-12-31 11:25:21 +01:00
parent f20c209c94
commit c83b04dfc0
2 changed files with 31 additions and 25 deletions

View File

@@ -33,11 +33,6 @@ export default function BoardPage({
);
}
type BoardGetServerSideProps = {
config: ConfigType;
_nextI18Next?: SSRConfig['_nextI18Next'];
};
export const getServerSideProps = async (context: GetServerSidePropsContext) => {
const session = await getServerAuthSession(context);
const boardName = await getDefaultBoardAsync(session?.user?.id, 'default');
@@ -66,9 +61,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
// Fetch containers if user is admin, otherwise we don't need them
try {
if (session?.user.isAdmin == true) containers = await caller.containers();
} catch (error) {
}
} catch (error) {}
return {
props: {
config,