Skip to content

Commit

Permalink
fix: import
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvatore Laiso committed Nov 19, 2024
1 parent 4c33ce1 commit 73d9235
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/utils/unique_email_enforcement/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { flow } from "fp-ts/lib/function";
import { TableClient, odata, RestError } from "@azure/data-tables";
import { EmailString } from "@pagopa/ts-commons/lib/strings";

import { TableEntity } from "../data_tables";
import { TableEntityAzureDataTables } from "../data_tables";

import {
ProfileEmail,
Expand All @@ -14,11 +14,14 @@ import {
ProfileEmailWriterError
} from "./index";

const ProfileEmailToTableEntity = new t.Type<ProfileEmail, TableEntity>(
const ProfileEmailToTableEntity = new t.Type<
ProfileEmail,
TableEntityAzureDataTables
>(
"TableEntityFromProfileEmail",
ProfileEmail.is,
flow(
TableEntity.decode,
TableEntityAzureDataTables.decode,
E.chain(({ partitionKey: email, rowKey: fiscalCode }) =>
ProfileEmail.decode({ email, fiscalCode })
)
Expand Down

0 comments on commit 73d9235

Please sign in to comment.