Skip to content

Commit

Permalink
Add GB_GEO to compliance reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher-Li committed Jun 13, 2024
1 parent 2bafa9a commit 5486937
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as Knex from 'knex';

import { formatAlterTableEnumSql } from '../helpers';

export async function up(knex: Knex): Promise<void> {
return knex.raw(formatAlterTableEnumSql(
'compliance_status',
'reason',
['MANUAL', 'US_GEO', 'CA_GEO', 'GB_GEO', 'SANCTIONED_GEO', 'COMPLIANCE_PROVIDER'],
));
}

export async function down(knex: Knex): Promise<void> {
return knex.raw(formatAlterTableEnumSql(
'compliance_status',
'reason',
['MANUAL', 'US_GEO', 'CA_GEO', 'SANCTIONED_GEO', 'COMPLIANCE_PROVIDER'],
));
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export enum ComplianceReason {
MANUAL = 'MANUAL',
US_GEO = 'US_GEO',
CA_GEO = 'CA_GEO',
GB_GEO = 'GB_GEO',
SANCTIONED_GEO = 'SANCTIONED_GEO',
COMPLIANCE_PROVIDER = 'COMPLIANCE_PROVIDER',
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export function getGeoComplianceReason(
return ComplianceReason.US_GEO;
} else if (country === 'CA') {
return ComplianceReason.CA_GEO;
} else if (country === 'GB') {
return ComplianceReason.GB_GEO;
} else {
return ComplianceReason.SANCTIONED_GEO;
}
Expand Down

0 comments on commit 5486937

Please sign in to comment.