Skip to content

Commit

Permalink
Clean up region state mapping in backend
Browse files Browse the repository at this point in the history
  • Loading branch information
nickviola committed Mar 20, 2024
1 parent c9ed7d3 commit 574cdb4
Showing 1 changed file with 7 additions and 62 deletions.
69 changes: 7 additions & 62 deletions backend/src/api/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ import {
OrganizationTag,
PendingDomain
} from '../models';
import { validateBody, wrapHandler, NotFound, Unauthorized } from './helpers';
import {
validateBody,
wrapHandler,
NotFound,
REGION_STATE_MAP,
Unauthorized
} from './helpers';
import {
isOrgAdmin,
isGlobalWriteAdmin,
Expand Down Expand Up @@ -986,67 +992,6 @@ export const addUserV2 = wrapHandler(async (event) => {
return NotFound;
});

export const REGION_STATE_MAP = {
Alabama: '4',
Alaska: '10',
'American Samoa': '9',
Arizona: '9',
Arkansas: '6',
California: '9',
Colorado: '8',
'Commonwealth Northern Mariana Islands': '9',
Connecticut: '1',
Delaware: '3',
'District of Columbia': '3',
'Federal States of Micronesia': '9',
Florida: '4',
Georgia: '4',
Guam: '9',
Hawaii: '9',
Idaho: '10',
Illinois: '5',
Indiana: '5',
Iowa: '7',
Kansas: '7',
Kentucky: '4',
Louisiana: '6',
Maine: '1',
Maryland: '3',
Massachusetts: '1',
Michigan: '5',
Minnesota: '5',
Mississippi: '4',
Missouri: '7',
Montana: '8',
Nebraska: '7',
Nevada: '9',
'New Hampshire': '1',
'New Jersey': '2',
'New Mexico': '6',
'New York': '2',
'North Carolina': '4',
'North Dakota': '8',
Ohio: '5',
Oklahoma: '6',
Oregon: '10',
Pennsylvania: '3',
'Puerto Rico': '2',
'Republic of Marshall Islands': '9',
'Rhode Island': '1',
'South Carolina': '4',
'South Dakota': '8',
Tennessee: '4',
Texas: '6',
Utah: '8',
Vermont: '1',
Virginia: '3',
'Virgin Islands': '2',
Washington: '10',
'West Virginia': '3',
Wisconsin: '5',
Wyoming: '8'
};

/**
* @swagger
*
Expand Down

0 comments on commit 574cdb4

Please sign in to comment.