mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-18 03:31:58 +08:00
chore: make import paths consistent
This commit is contained in:
@ -1,10 +1,9 @@
|
||||
import NextAuth, { type NextAuthOptions } from 'next-auth';
|
||||
import GitHubProvider from 'next-auth/providers/github';
|
||||
// Prisma adapter for NextAuth, optional and can be removed
|
||||
import { PrismaAdapter } from '@next-auth/prisma-adapter';
|
||||
|
||||
import { env } from '../../../env/server.mjs';
|
||||
import { prisma } from '../../../server/db/client';
|
||||
import { env } from '~/env/server.mjs';
|
||||
import { prisma } from '~/server/db/client';
|
||||
|
||||
export const authOptions: NextAuthOptions = {
|
||||
// Configure one or more authentication providers
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
import type { NextApiRequest, NextApiResponse } from 'next';
|
||||
|
||||
import { getServerAuthSession } from '../../server/common/get-server-auth-session';
|
||||
import { getServerAuthSession } from '~/server/common/get-server-auth-session';
|
||||
|
||||
const restricted = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
const session = await getServerAuthSession({ req, res });
|
||||
|
@ -1,9 +1,8 @@
|
||||
// Src/pages/api/trpc/[trpc].ts
|
||||
import { createNextApiHandler } from '@trpc/server/adapters/next';
|
||||
|
||||
import { env } from '../../../env/server.mjs';
|
||||
import { appRouter } from '../../../server/router';
|
||||
import { createContext } from '../../../server/router/context';
|
||||
import { env } from '~/env/server.mjs';
|
||||
import { appRouter } from '~/server/router';
|
||||
import { createContext } from '~/server/router/context';
|
||||
|
||||
// Export API handler
|
||||
export default createNextApiHandler({
|
||||
|
Reference in New Issue
Block a user