Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: simpleSchemas format
Signed-off-by: vanpho93 <[email protected]>
  • Loading branch information
vanpho93 committed Mar 16, 2023
commit ac5df58b5c342cb4c6380e0e4392c69c436c6bd4
75 changes: 7 additions & 68 deletions packages/api-plugin-location/src/simpleSchemas.js
Original file line number Diff line number Diff line change
@@ -1,74 +1,13 @@
import SimpleSchema from "simpl-schema";
import CountryDefinitions from "@reactioncommerce/api-utils/CountryDefinitions.js";

const withoutCodeCountries = [
"AO",
"AG",
"AW",
"BS",
"BZ",
"BJ",
"BW",
"BF",
"BI",
"CM",
"CF",
"KM",
"CG",
"CD",
"CK",
"CI",
"DJ",
"DM",
"GQ",
"ER",
"FJ",
"TF",
"GM",
"GH",
"GD",
"GN",
"GY",
"HK",
"IE",
"JM",
"KE",
"KI",
"MO",
"MW",
"ML",
"MR",
"MU",
"MS",
"NR",
"AN",
"NU",
"KP",
"PA",
"QA",
"RW",
"KN",
"LC",
"ST",
"SA",
"SC",
"SL",
"SB",
"SO",
"SR",
"SY",
"TZ",
"TL",
"TK",
"TO",
"TT",
"TV",
"UG",
"AE",
"VU",
"YE",
"ZW"
];
const withoutCodeCountries = ["AO", "AG", "AW", "BS", "BZ", "BJ", "BW",
"BF", "BI", "CM", "CF", "KM", "CG", "CD", "CK", "CI", "DJ",
"DM", "GQ", "ER", "FJ", "TF", "GM", "GH", "GD", "GN", "GY",
"HK", "IE", "JM", "KE", "KI", "MO", "MW", "ML", "MR", "MU",
"MS", "NR", "AN", "NU", "KP", "PA", "QA", "RW", "KN", "LC",
"ST", "SA", "SC", "SL", "SB", "SO", "SR", "SY", "TZ", "TL",
"TK", "TO", "TT", "TV", "UG", "AE", "VU", "YE", "ZW"];

export const LocationAddress = new SimpleSchema({
address1: {
Expand Down