(radar) Remove IP ban system

This commit is contained in:
Baptiste Arnaud
2024-01-02 10:16:10 +01:00
parent 624642974b
commit 7ce1a4d3d1
4 changed files with 5 additions and 46 deletions

View File

@@ -1,15 +1,12 @@
import { getAuthenticatedUser } from '@/features/auth/helpers/getAuthenticatedUser'
import { inferAsyncReturnType } from '@trpc/server'
import * as trpcNext from '@trpc/server/adapters/next'
import { getIp } from '@typebot.io/lib/getIp'
export async function createContext(opts: trpcNext.CreateNextContextOptions) {
const user = await getAuthenticatedUser(opts.req, opts.res)
const ip = getIp(opts.req)
return {
user,
ip,
}
}