mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 10:19:51 -06:00
15 lines
475 B
TypeScript
15 lines
475 B
TypeScript
import "server-only";
|
|
|
|
import { TAttributeClass } from "@formbricks/types/attributeClasses";
|
|
|
|
export const formatAttributeClassDateFields = (attributeClass: TAttributeClass): TAttributeClass => {
|
|
if (typeof attributeClass.createdAt === "string") {
|
|
attributeClass.createdAt = new Date(attributeClass.createdAt);
|
|
}
|
|
if (typeof attributeClass.updatedAt === "string") {
|
|
attributeClass.updatedAt = new Date(attributeClass.updatedAt);
|
|
}
|
|
|
|
return attributeClass;
|
|
};
|