mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 18:30:32 -06:00
15 lines
370 B
TypeScript
15 lines
370 B
TypeScript
import "server-only";
|
|
|
|
import { TInvite } from "@formbricks/types/invites";
|
|
|
|
export const formatInviteDateFields = (invite: TInvite): TInvite => {
|
|
if (typeof invite.createdAt === "string") {
|
|
invite.createdAt = new Date(invite.createdAt);
|
|
}
|
|
if (typeof invite.expiresAt === "string") {
|
|
invite.expiresAt = new Date(invite.expiresAt);
|
|
}
|
|
|
|
return invite;
|
|
};
|