mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-08 02:43:06 -05:00
chore: move all services into the new folder structure (#948)
* chore: move environment services * chore: move all services
This commit is contained in:
@@ -12,7 +12,7 @@ import { TJsActionInput } from "@formbricks/types/v1/js";
|
||||
import { revalidateTag } from "next/cache";
|
||||
import { EventType } from "@prisma/client";
|
||||
import { getActionClassCacheTag, getActionClassCached } from "../actionClass/service";
|
||||
import { getSessionCached } from "../services/session";
|
||||
import { getSessionCached } from "../session/service";
|
||||
|
||||
export const getActionsByEnvironmentId = cache(
|
||||
async (environmentId: string, limit?: number): Promise<TAction[]> => {
|
||||
|
||||
@@ -13,7 +13,7 @@ import { Prisma } from "@prisma/client";
|
||||
import { revalidateTag } from "next/cache";
|
||||
import { cache } from "react";
|
||||
import { validateInputs } from "../utils/validate";
|
||||
import { transformPrismaPerson } from "../services/person";
|
||||
import { transformPrismaPerson } from "../person/service";
|
||||
|
||||
const selectDisplay = {
|
||||
id: true,
|
||||
|
||||
@@ -11,7 +11,7 @@ import { cache } from "react";
|
||||
import { z } from "zod";
|
||||
import { SERVICES_REVALIDATION_INTERVAL } from "../constants";
|
||||
import { validateInputs } from "../utils/validate";
|
||||
import { createEnvironment, getEnvironmentCacheTag, getEnvironmentsCacheTag } from "./environment";
|
||||
import { createEnvironment, getEnvironmentCacheTag, getEnvironmentsCacheTag } from "../environment/service";
|
||||
|
||||
export const getProductsCacheTag = (teamId: string): string => `teams-${teamId}-products`;
|
||||
const getProductCacheTag = (environmentId: string): string => `environments-${environmentId}-product`;
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { MembershipRole, Prisma } from "@prisma/client";
|
||||
import { unstable_cache, revalidateTag } from "next/cache";
|
||||
import { validateInputs } from "../utils/validate";
|
||||
import { deleteTeam } from "./team";
|
||||
import { deleteTeam } from "../team/service";
|
||||
import { z } from "zod";
|
||||
import { SERVICES_REVALIDATION_INTERVAL } from "../constants";
|
||||
|
||||
@@ -14,7 +14,7 @@ import { TTag } from "@formbricks/types/v1/tags";
|
||||
import { Prisma } from "@prisma/client";
|
||||
import { z } from "zod";
|
||||
import { cache } from "react";
|
||||
import { getPerson, transformPrismaPerson } from "../services/person";
|
||||
import { getPerson, transformPrismaPerson } from "../person/service";
|
||||
import { captureTelemetry } from "../telemetry";
|
||||
import { validateInputs } from "../utils/validate";
|
||||
import { ZId } from "@formbricks/types/v1/environment";
|
||||
|
||||
@@ -5,7 +5,7 @@ import { unstable_cache } from "next/cache";
|
||||
import { ZId } from "@formbricks/types/v1/environment";
|
||||
import { canUserAccessResponse } from "../response/auth";
|
||||
import { canUserAccessTag } from "../tag/auth";
|
||||
import { getTagOnResponseCacheTag } from "../services/tagOnResponse";
|
||||
import { getTagOnResponseCacheTag } from "./service";
|
||||
import { SERVICES_REVALIDATION_INTERVAL } from "../constants";
|
||||
|
||||
export const canUserAccessTagOnResponse = async (
|
||||
|
||||
Reference in New Issue
Block a user