Skip to content

Commit

Permalink
move geo type to sharedAPI constants, remove unused activity type fro…
Browse files Browse the repository at this point in the history
…m constants
  • Loading branch information
meghna0593 committed Dec 18, 2024
1 parent 0387571 commit 43599d5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
9 changes: 0 additions & 9 deletions api/src/constants.ts

This file was deleted.

12 changes: 0 additions & 12 deletions api/src/constants/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,6 @@ export const ALL_ROLES = [
Role.PRIMARY_BIOCONTROL_USER
];

/**
* Supported activity types.
*
* @export
* @enum {number}
*/
export enum ActivityType {
OBSERVATION = 'Observation',
MONITOR = 'Monitor',
TREATMENT = 'Treatment'
}

/**
* Some of the S3 ACL roles supported by default.
*
Expand Down
2 changes: 1 addition & 1 deletion api/src/utils/kml-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as GeoJSON from '@mapbox/togeojson';
import AdmZip from 'adm-zip';
import { FeatureCollection } from 'geojson';
import { getLogger } from 'utils/logger';
import { VALID_GEOMETRY_TYPES } from 'constants';
import { VALID_GEOMETRY_TYPES } from 'sharedAPI';

function KMZToKML(data: Buffer): Buffer {
const log = getLogger('KML');
Expand Down
10 changes: 10 additions & 0 deletions sharedAPI/src/validation/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ export const FORM_SUBTYPES_WITH_AREA_LIMITS = [
'Activity_Transect_BiocontrolEfficacy',
'Activity_Biocontrol_Collection'
];

export const VALID_GEOMETRY_TYPES = [
'GeometryCollection',
'MultiPolygon',
'MultiLineString',
'MultiPoint',
'Polygon',
'LineString',
'Point'
];

0 comments on commit 43599d5

Please sign in to comment.