diff --git a/projects/backend/src/common/cache.util.ts b/projects/backend/src/common/cache.util.ts index 5e98303..f9fba0c 100644 --- a/projects/backend/src/common/cache.util.ts +++ b/projects/backend/src/common/cache.util.ts @@ -1,5 +1,5 @@ import { SSRCache } from "@ssr/common/cache"; -import { InternalServerError } from "../error/internal-server-error"; +import { InternalServerError } from "@ssr/common/error/internal-server-error"; import { isProduction } from "@ssr/common/utils/utils"; /** diff --git a/projects/backend/src/service/player.service.ts b/projects/backend/src/service/player.service.ts index 1465d01..5f237b5 100644 --- a/projects/backend/src/service/player.service.ts +++ b/projects/backend/src/service/player.service.ts @@ -1,9 +1,9 @@ import { PlayerDocument, PlayerModel } from "@ssr/common/model/player"; -import { NotFoundError } from "../error/not-found-error"; +import { NotFoundError } from "@ssr/common/error/not-found-error"; import { getDaysAgoDate, getMidnightAlignedDate } from "@ssr/common/utils/time-utils"; import { scoresaberService } from "@ssr/common/service/impl/scoresaber"; import ScoreSaberPlayerToken from "@ssr/common/types/token/scoresaber/score-saber-player-token"; -import { InternalServerError } from "../error/internal-server-error"; +import { InternalServerError } from "@ssr/common/error/internal-server-error"; import { formatPp } from "@ssr/common/utils/number-utils"; import { delay, getPageFromRank, isProduction } from "@ssr/common/utils/utils"; import { DiscordChannels, logToChannel } from "../bot/bot"; diff --git a/projects/backend/src/error/internal-server-error.ts b/projects/common/src/error/internal-server-error.ts similarity index 78% rename from projects/backend/src/error/internal-server-error.ts rename to projects/common/src/error/internal-server-error.ts index 5172c4a..f774f23 100644 --- a/projects/backend/src/error/internal-server-error.ts +++ b/projects/common/src/error/internal-server-error.ts @@ -1,4 +1,4 @@ -import { HttpCode } from "../common/http-codes"; +import { HttpCode } from "backend/src/common/http-codes"; export class InternalServerError extends Error { constructor( diff --git a/projects/backend/src/error/not-found-error.ts b/projects/common/src/error/not-found-error.ts similarity index 76% rename from projects/backend/src/error/not-found-error.ts rename to projects/common/src/error/not-found-error.ts index 3f6ca8f..b7cbe6f 100644 --- a/projects/backend/src/error/not-found-error.ts +++ b/projects/common/src/error/not-found-error.ts @@ -1,4 +1,4 @@ -import { HttpCode } from "../common/http-codes"; +import { HttpCode } from "backend/src/common/http-codes"; export class NotFoundError extends Error { constructor( diff --git a/projects/backend/src/error/rate-limit-error.ts b/projects/common/src/error/rate-limit-error.ts similarity index 77% rename from projects/backend/src/error/rate-limit-error.ts rename to projects/common/src/error/rate-limit-error.ts index f458d91..2e96fdf 100644 --- a/projects/backend/src/error/rate-limit-error.ts +++ b/projects/common/src/error/rate-limit-error.ts @@ -1,4 +1,4 @@ -import { HttpCode } from "../common/http-codes"; +import { HttpCode } from "backend/src/common/http-codes"; export class RateLimitError extends Error { constructor( diff --git a/projects/common/src/pagination.ts b/projects/common/src/pagination.ts index 014ce36..7a113fe 100644 --- a/projects/common/src/pagination.ts +++ b/projects/common/src/pagination.ts @@ -1,5 +1,5 @@ -import { NotFoundError } from "backend/src/error/not-found-error"; import { Metadata } from "./types/metadata"; +import { NotFoundError } from "./error/not-found-error"; type FetchItemsFunction = (fetchItems: FetchItems) => Promise;