File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
10
10
### Changed
11
11
12
12
- Remove node streams-based ingest code to prepare for post-ingest notifications
13
+ - Use the ` type ` field to determine if ingest is a Collection or Item
13
14
14
15
## [ 1.1.0] - 2023-05-02
15
16
Original file line number Diff line number Diff line change @@ -6,13 +6,13 @@ const COLLECTIONS_INDEX = process.env['COLLECTIONS_INDEX'] || 'collections'
6
6
7
7
export async function convertIngestObjectToDbObject (
8
8
// eslint-disable-next-line max-len
9
- /** @type {{ hasOwnProperty: (arg0: string) => any; collection: string; links: any[]; id: any; } } */ data
9
+ /** @type {{ hasOwnProperty: (arg0: string) => any; type: string, collection: string; links: any[]; id: any; } } */ data
10
10
) {
11
11
let index = ''
12
12
logger . debug ( 'data' , data )
13
- if ( data && data . hasOwnProperty ( 'extent' ) ) {
13
+ if ( data && data . type === 'Collection' ) {
14
14
index = COLLECTIONS_INDEX
15
- } else if ( data && data . hasOwnProperty ( 'geometry' ) ) {
15
+ } else if ( data && data . type === 'Feature' ) {
16
16
index = data . collection
17
17
} else {
18
18
return null
You can’t perform that action at this time.
0 commit comments