From 8c072d32a009c769951682fab139a1c61d766f4e Mon Sep 17 00:00:00 2001 From: Yasamato Date: Sun, 8 Dec 2024 19:18:21 +0100 Subject: [PATCH] Yeet unused ENV NEXTAUTH_URL (#109) --- Dockerfile | 1 - README.md | 1 - auth.ts | 1 - cleanup.mjs | 4 ---- components/data/DataItem.tsx | 2 +- docker-compose.yml | 1 - 6 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index d9a67be2..45b9128d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ ENV CHROME_URL="ws://chrome:3000" ENV NEXT_PUBLIC_SITE_NAME="The Anime Index" # connection urls -ENV NEXTAUTH_URL="https://theindex.moe" ENV NEXT_PUBLIC_DOMAIN="https://theindex.moe" ENV AUTH_TRUST_HOST="true" ENV DATABASE_URL="mongodb://mongo:27017/index" diff --git a/README.md b/README.md index d7bbc778..a5aa9ce8 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,6 @@ Here is a collection of the possible environment variables with their default va | ---------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------------ | | `NEXT_PUBLIC_SITE_NAME` | The name of your site | `"The Index"` | | `NEXT_PUBLIC_DOMAIN` | Your domain or IP, remove trailing slash | `"https://theindex.moe"` | -| `NEXTAUTH_URL` | Your domain or IP, remove trailing slash | `$NEXT_PUBLIC_DOMAIN` | | `DATABASE_URL` | Take a look at [mongodb docs](https://docs.mongodb.com/manual/reference/connection-string/) | `"mongodb://mongo:27017/index"` | | `CACHE_URL` | Connection string for the redis cache database | `"redis://redis:6379"` | | `CHROME_URL` | WebSocket URL to a running chrome instance | `"ws://chrome:3300"` | diff --git a/auth.ts b/auth.ts index 43e01ecd..d1a17ec0 100644 --- a/auth.ts +++ b/auth.ts @@ -4,7 +4,6 @@ import { addUser } from './lib/db/users' import { AccountType, type User } from './types/User' import { MongoDBAdapter } from '@auth/mongodb-adapter' import { dbClient } from './lib/db/db' -import { ObjectId } from 'mongodb' import type { NextAuthConfig } from 'next-auth' import { findOneTyped } from './lib/db/dbTyped' import { Types } from './types/Components' diff --git a/cleanup.mjs b/cleanup.mjs index 47a28bd4..cb4750ef 100644 --- a/cleanup.mjs +++ b/cleanup.mjs @@ -34,10 +34,6 @@ if (!('NEXT_PUBLIC_DOMAIN' in process.env)) { warnEnv('NEXT_PUBLIC_DOMAIN', 'https://theindex.moe') } -if (!('NEXTAUTH_URL' in process.env)) { - warnEnv('NEXTAUTH_URL', 'https://theindex.moe') -} - if (!('DATABASE_URL' in process.env)) { warnEnv('DATABASE_URL', 'mongodb://mongo:27017/index') } diff --git a/components/data/DataItem.tsx b/components/data/DataItem.tsx index 74222049..6de6f515 100644 --- a/components/data/DataItem.tsx +++ b/components/data/DataItem.tsx @@ -52,7 +52,7 @@ const DataItem: FC = ({ data, column, onChange }) => { return } - console.error('Unknown type of column or data:', column, typeof data) + console.error('Unknown type of column or data:', column, typeof data, data) return
Error: Unknown column type
} diff --git a/docker-compose.yml b/docker-compose.yml index 6ecf9fcc..f7d3b2a4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,6 @@ services: NEXT_PUBLIC_SITE_NAME: ${NEXT_PUBLIC_SITE_NAME} # domain url for sessions - NEXTAUTH_URL: ${NEXTAUTH_URL} NEXT_PUBLIC_DOMAIN: ${NEXT_PUBLIC_DOMAIN} NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}