2
0

🧰 Aggregate utils & set up results collection in viewer

This commit is contained in:
Baptiste Arnaud
2021-12-29 10:22:26 +01:00
parent 447172d0cb
commit f088f694b9
42 changed files with 404 additions and 141 deletions

View File

@ -2,7 +2,7 @@ import { DashboardFolder, User } from 'db'
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const session = await getSession({ req })

View File

@ -2,7 +2,7 @@ import { DashboardFolder } from 'db'
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const session = await getSession({ req })

View File

@ -1,7 +1,7 @@
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const session = await getSession({ req })

View File

@ -1,7 +1,7 @@
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const session = await getSession({ req })

View File

@ -1,7 +1,7 @@
import aws from 'aws-sdk'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const maxUploadFileSize = 10485760 // 10 MB
const handler = async (

View File

@ -1,5 +1,5 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
import Stripe from 'stripe'
const usdPriceIdTest = 'price_1Jc4TQKexUFvKTWyGvsH4Ff5'

View File

@ -1,7 +1,7 @@
import { User } from 'db'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
import Stripe from 'stripe'
const createCheckoutSession = async (

View File

@ -1,5 +1,5 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
import Stripe from 'stripe'
import Cors from 'micro-cors'
import { buffer } from 'micro'

View File

@ -3,7 +3,7 @@ import { User } from 'db'
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const session = await getSession({ req })

View File

@ -1,7 +1,7 @@
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const session = await getSession({ req })

View File

@ -1,7 +1,7 @@
import prisma from 'libs/prisma'
import { NextApiRequest, NextApiResponse } from 'next'
import { getSession } from 'next-auth/react'
import { methodNotAllowed } from 'services/api/utils'
import { methodNotAllowed } from 'utils'
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const session = await getSession({ req })