Skip to content

Commit

Permalink
New /data endpoint: Fix annotation support (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Apr 19, 2023
1 parent beb5300 commit a43792e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ export class DataService {
return []
}
const model = models[type]
const prop = model.schema.paths.id ? "id" : "uri"
const results = await model.find({ $or: [
{ uri: { $in: uris } },
{ [prop]: { $in: uris } },
{ identifier: { $in: uris } },
] }).lean()
// Return adjusted data (needs to be done separately for each data type)
Expand Down

0 comments on commit a43792e

Please sign in to comment.