@openneuro/server 4.19.0-alpha.0 → 4.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openneuro/server",
|
|
3
|
-
"version": "4.19.0
|
|
3
|
+
"version": "4.19.0",
|
|
4
4
|
"description": "Core service for the OpenNeuro platform.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "src/server.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@apollo/client": "3.7.2",
|
|
19
19
|
"@elastic/elasticsearch": "7.15.0",
|
|
20
|
-
"@openneuro/search": "^4.19.0
|
|
20
|
+
"@openneuro/search": "^4.19.0",
|
|
21
21
|
"@passport-next/passport-google-oauth2": "^1.0.0",
|
|
22
22
|
"@sentry/node": "^4.5.3",
|
|
23
23
|
"apollo-server": "2.25.4",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"access": "public"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "3c492035f9762ceabc8a717866f6d4e78fdcf7a9"
|
|
96
96
|
}
|
|
@@ -8,12 +8,12 @@ import { permissions } from './permissions'
|
|
|
8
8
|
*
|
|
9
9
|
* User modified fields are queried from the Metadata model and dynamic metadata is updated from the latest snapshot
|
|
10
10
|
*/
|
|
11
|
-
export const metadata = async (dataset, _,
|
|
11
|
+
export const metadata = async (dataset, _, context) => {
|
|
12
12
|
const record = await MetadataModel.findOne({
|
|
13
13
|
datasetId: dataset.id,
|
|
14
14
|
}).lean()
|
|
15
15
|
// Replace dynamic fields with latest available
|
|
16
|
-
const snapshot = await latestSnapshot(dataset, null,
|
|
16
|
+
const snapshot = await latestSnapshot(dataset, null, context)
|
|
17
17
|
const description = await snapshot.description()
|
|
18
18
|
const summary = await snapshot.summary()
|
|
19
19
|
// Find the users with admin access
|
|
@@ -35,7 +35,7 @@ export const metadata = async (dataset, _, { user }) => {
|
|
|
35
35
|
datasetId: dataset.id,
|
|
36
36
|
datasetName: description.Name,
|
|
37
37
|
tasksCompleted: summary.tasks,
|
|
38
|
-
seniorAuthor: description.Authors[
|
|
38
|
+
seniorAuthor: description.Authors[description.Authors.length - 1],
|
|
39
39
|
adminUsers,
|
|
40
40
|
firstSnapshotCreatedAt,
|
|
41
41
|
latestSnapshotCreatedAt: snapshot.created,
|