diff --git a/src/components/BestRepository.tsx b/src/components/BestRepository.tsx index eef6395..052670a 100644 --- a/src/components/BestRepository.tsx +++ b/src/components/BestRepository.tsx @@ -5,7 +5,7 @@ import z from "zod"; import { format as formatTimeAgo } from "timeago.js"; -import { RepositoryResponse } from "@models/responses"; +import { RepositoryResponse } from "@models/git/responses"; const BestRepository: FC<{ repository: z.infer }> = ({ repository }) => { diff --git a/src/components/FeaturedRepositories.tsx b/src/components/FeaturedRepositories.tsx index 8839549..ec19708 100644 --- a/src/components/FeaturedRepositories.tsx +++ b/src/components/FeaturedRepositories.tsx @@ -7,7 +7,7 @@ import Link from "next/link"; import multipleClassNames from "@utils/multipleClassNames"; -import { RepositoryResponse } from "@models/responses"; +import { RepositoryResponse } from "@models/git/responses"; import styles from "./repositories.module.scss"; diff --git a/src/components/User.tsx b/src/components/User.tsx index ed3ccf5..f30f71f 100644 --- a/src/components/User.tsx +++ b/src/components/User.tsx @@ -3,7 +3,7 @@ import z from "zod"; import Image from "next/image"; -import { UserResponse } from "@models/responses"; +import { UserResponse } from "@models/git/responses"; import { giteaServerUrl } from "@utils/config"; import multipleClassNames from "@utils/multipleClassNames"; diff --git a/src/utils/config.ts b/src/utils/config.ts index 0438e8a..8539786 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -16,7 +16,7 @@ export const sessionOptions = { }; export const registrationIsEnabled = - process.env.NEXT_PUBLIC_ALLOW_REGISTRATION !== undefined ? true : false; + process.env.ALLOW_REGISTRATION !== undefined ? true : false; export const saltRoundsForPassword = parseInt(process.env.PASSWORD_SALT_ROUNDS ?? "") || 10; diff --git a/src/utils/errors.ts b/src/utils/errors.ts index b8c7f6c..ed83729 100644 --- a/src/utils/errors.ts +++ b/src/utils/errors.ts @@ -14,4 +14,4 @@ export const unauthorized: Response = baseError( ); export const parseUserInputError: (error: unknown) => string = (error) => - "Failed to parse user input: ".concat(error); + "Failed to parse user input: ".concat(JSON.stringify(error));