mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-05-04 23:03:14 +02:00
30 lines
645 B
JavaScript
30 lines
645 B
JavaScript
import RepoList from '../../../Containers/RepoList/RepoList';
|
|
import { authOptions } from '../../../pages/api/auth/[...nextauth]';
|
|
import { unstable_getServerSession } from 'next-auth/next';
|
|
|
|
export default function Add() {
|
|
return <RepoList />;
|
|
}
|
|
|
|
export async function getServerSideProps(context) {
|
|
//Var
|
|
const session = await unstable_getServerSession(
|
|
context.req,
|
|
context.res,
|
|
authOptions
|
|
);
|
|
|
|
if (!session) {
|
|
return {
|
|
redirect: {
|
|
destination: '/login',
|
|
permanent: false,
|
|
},
|
|
};
|
|
}
|
|
|
|
return {
|
|
props: {},
|
|
};
|
|
}
|