mirror of
https://github.com/formbricks/formbricks.git
synced 2026-03-03 10:09:16 -06:00
chore: format code based on prettier rules (#792)
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
import { updateEnvironment } from "@formbricks/lib/services/environment";
|
||||
import { TEnvironment, TEnvironmentUpdateInput } from "@formbricks/types/v1/environment";
|
||||
|
||||
export async function updateEnvironmentAction(environmentId: string, data: Partial<TEnvironmentUpdateInput>): Promise<TEnvironment> {
|
||||
export async function updateEnvironmentAction(
|
||||
environmentId: string,
|
||||
data: Partial<TEnvironmentUpdateInput>
|
||||
): Promise<TEnvironment> {
|
||||
return await updateEnvironment(environmentId, data);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,10 @@ interface WidgetStatusIndicatorProps {
|
||||
environment: TEnvironment;
|
||||
type: "large" | "mini";
|
||||
actions: TAction[];
|
||||
updateEnvironmentAction: (environmentId: string, data: Partial<TEnvironmentUpdateInput>) => Promise<TEnvironment>;
|
||||
updateEnvironmentAction: (
|
||||
environmentId: string,
|
||||
data: Partial<TEnvironmentUpdateInput>
|
||||
) => Promise<TEnvironment>;
|
||||
}
|
||||
|
||||
export default function WidgetStatusIndicator({
|
||||
|
||||
@@ -76,7 +76,10 @@ export const getEnvironments = cache(async (productId: string): Promise<TEnviron
|
||||
}
|
||||
});
|
||||
|
||||
export const updateEnvironment = async (environmentId: string, data: Partial<TEnvironmentUpdateInput>): Promise<TEnvironment> => {
|
||||
export const updateEnvironment = async (
|
||||
environmentId: string,
|
||||
data: Partial<TEnvironmentUpdateInput>
|
||||
): Promise<TEnvironment> => {
|
||||
const newData = { ...data, updatedAt: new Date() };
|
||||
let updatedEnvironment;
|
||||
try {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import { ZActionClass } from "./actionClasses";
|
||||
|
||||
|
||||
export const ZAction = z.object({
|
||||
id: z.string(),
|
||||
createdAt: z.date(),
|
||||
@@ -11,4 +10,3 @@ export const ZAction = z.object({
|
||||
});
|
||||
|
||||
export type TAction = z.infer<typeof ZAction>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user