@openneuro/server 4.20.0-alpha.4 → 4.20.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.20.0-alpha.4",
3
+ "version": "4.20.0",
4
4
  "description": "Core service for the OpenNeuro platform.",
5
5
  "license": "MIT",
6
6
  "main": "src/server.js",
@@ -21,7 +21,7 @@
21
21
  "@elastic/elasticsearch": "7.15.0",
22
22
  "@graphql-tools/schema": "^10.0.0",
23
23
  "@keyv/redis": "^2.7.0",
24
- "@openneuro/search": "^4.20.0-alpha.4",
24
+ "@openneuro/search": "^4.20.0",
25
25
  "@passport-next/passport-google-oauth2": "^1.0.0",
26
26
  "@sentry/node": "^4.5.3",
27
27
  "base64url": "^3.0.0",
@@ -45,7 +45,6 @@
45
45
  "jsonwebtoken": "^9.0.0",
46
46
  "keyv": "^4.5.3",
47
47
  "mime-types": "^2.1.19",
48
- "moment": "^2.14.1",
49
48
  "mongoose": "^6.11.3",
50
49
  "morgan": "^1.6.1",
51
50
  "node-mailjet": "^3.3.5",
@@ -88,5 +87,5 @@
88
87
  "publishConfig": {
89
88
  "access": "public"
90
89
  },
91
- "gitHead": "b658c22b75a090a38bdfc3aab081304f5d43c9c8"
90
+ "gitHead": "805c0d585ec562c754ac53a3fc30a4202b10dd9e"
92
91
  }
@@ -1,6 +1,6 @@
1
1
  // @ts-nocheck
2
2
  import notifications from '../libs/notifications.js'
3
- import moment from 'moment'
3
+ import { format } from 'date-fns/format'
4
4
  import User from '../models/user'
5
5
  import Comment from '../models/comment'
6
6
  import MailgunIdentifier from '../models/mailgunIdentifier'
@@ -63,7 +63,7 @@ export async function reply(req, res, next) {
63
63
  parentId: parentId,
64
64
  text: text,
65
65
  user: flattenedUser,
66
- createDate: moment().format(),
66
+ createDate: format(new Date()),
67
67
  }
68
68
  Comment.create(comment, (err, response) => {
69
69
  if (err) {
@@ -4,7 +4,7 @@ import { send as emailSend } from './email'
4
4
  import request from 'superagent'
5
5
  import User from '../models/user'
6
6
  import Subscription from '../models/subscription'
7
- import moment from 'moment'
7
+ import { format } from 'date-fns'
8
8
  import url from 'url'
9
9
  import bidsId from './bidsId'
10
10
  import { convertFromRaw, EditorState } from 'draft-js'
@@ -150,7 +150,7 @@ const notifications = {
150
150
  datasetLabel: datasetLabel,
151
151
  commentUserId: userId,
152
152
  commentId: commentId,
153
- dateCreated: moment(comment.createDate).format('MMMM Do'),
153
+ dateCreated: format(comment.createDate, 'MMMM Do'),
154
154
  commentContent: htmlContent,
155
155
  commentStatus: commentStatus,
156
156
  siteUrl: