mirror of
https://github.com/Ravinou/borgwarehouse
synced 2026-03-14 14:25:46 +01:00
refactor: ⚡ next-auth does not support api versioning
This commit is contained in:
parent
144bea3947
commit
a3d156bdbf
21 changed files with 20 additions and 20 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import Head from 'next/head';
|
||||
import 'react-toastify/dist/ReactToastify.css';
|
||||
import { useSession } from 'next-auth/react';
|
||||
import { authOptions } from '../api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import { SessionStatus } from '~/types';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ConfigService } from '~/services';
|
||||
import { authOptions } from '../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { EmailSettingDTO, ErrorResponse } from '~/types';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { authOptions } from '../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { ConfigService, AuthService } from '~/services';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ConfigService } from '~/services';
|
||||
import { authOptions } from '../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { ErrorResponse, UsernameSettingDTO } from '~/types';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { ErrorResponse, WizardEnvEnum, WizardEnvType } from '~/types';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { authOptions } from '../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import ApiResponse from '~/helpers/functions/apiResponse';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { NextApiRequest, NextApiResponse } from 'next';
|
|||
import { getServerSession } from 'next-auth/next';
|
||||
import { ConfigService } from '~/services';
|
||||
import { ErrorResponse, AppriseAlertResponse } from '~/types';
|
||||
import { authOptions } from '../../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import ApiResponse from '~/helpers/functions/apiResponse';
|
||||
|
||||
export default async function handler(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { ConfigService } from '~/services';
|
||||
import { authOptions } from '../../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { AppriseModeDTO, ErrorResponse } from '~/types';
|
||||
import ApiResponse from '~/helpers/functions/apiResponse';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { ConfigService } from '~/services';
|
||||
import { authOptions } from '../../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { AppriseServicesDTO, ErrorResponse } from '~/types';
|
||||
import ApiResponse from '~/helpers/functions/apiResponse';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { getServerSession } from 'next-auth/next';
|
|||
import { promisify } from 'util';
|
||||
import { ConfigService } from '~/services';
|
||||
import { ErrorResponse, SuccessResponse } from '~/types';
|
||||
import { authOptions } from '../../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
|
||||
const execAsync = promisify(exec);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { ConfigService } from '~/services';
|
||||
import { authOptions } from '../../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { EmailAlertDTO, ErrorResponse } from '~/types';
|
||||
import ApiResponse from '~/helpers/functions/apiResponse';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { authOptions } from '../../auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import emailTest from '~/helpers/templates/emailTest';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { BorgWarehouseApiResponse, Repository } from '~/types';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import { BorgWarehouseApiResponse, Repository } from '~/types';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { useSession } from 'next-auth/react';
|
||||
import Head from 'next/head';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useEffect } from 'react';
|
|||
import { useForm } from 'react-hook-form';
|
||||
import { SpinnerDotted } from 'spinners-react';
|
||||
import { useFormStatus } from '~/hooks';
|
||||
import { authOptions } from './api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
|
||||
//Components
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { GetServerSidePropsContext } from 'next';
|
||||
import RepoList from '~/Containers/RepoList/RepoList';
|
||||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
|
||||
export default function Add() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { GetServerSidePropsContext } from 'next';
|
||||
import RepoList from '~/Containers/RepoList/RepoList';
|
||||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
|
||||
export default function Add() {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import Head from 'next/head';
|
||||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import SetupWizard from '../../Containers/SetupWizard/SetupWizard';
|
||||
import { useRouter } from 'next/router';
|
||||
import Head from 'next/head';
|
||||
import { authOptions } from '~/pages/api/v1/auth/[...nextauth]';
|
||||
import { authOptions } from '~/pages/api/auth/[...nextauth]';
|
||||
import { getServerSession } from 'next-auth/next';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue