diff --git a/backend/src/middleware/index.js b/backend/src/middleware/index.js index e6759e8ff..39bb0e775 100644 --- a/backend/src/middleware/index.js +++ b/backend/src/middleware/index.js @@ -11,7 +11,7 @@ import userMiddleware from './userMiddleware' import includedFieldsMiddleware from './includedFieldsMiddleware' import orderByMiddleware from './orderByMiddleware' import validUrlMiddleware from './validUrlMiddleware' -import notificationsMiddleware from './notificationsMiddleware' +import notificationsMiddleware from './notifications' export default schema => { let middleware = [ diff --git a/backend/src/middleware/notificationsMiddleware.js b/backend/src/middleware/notifications/index.js similarity index 92% rename from backend/src/middleware/notificationsMiddleware.js rename to backend/src/middleware/notifications/index.js index 30205278b..159f055f3 100644 --- a/backend/src/middleware/notificationsMiddleware.js +++ b/backend/src/middleware/notifications/index.js @@ -1,4 +1,4 @@ -import { extractSlugs } from './notifications/mentions' +import { extractSlugs } from './mentions' const notify = async (resolve, root, args, context, resolveInfo) => { const post = await resolve(root, args, context, resolveInfo) diff --git a/backend/src/middleware/notificationsMiddleware.spec.js b/backend/src/middleware/notifications/spec.js similarity index 95% rename from backend/src/middleware/notificationsMiddleware.spec.js rename to backend/src/middleware/notifications/spec.js index e6fc78c52..656f10636 100644 --- a/backend/src/middleware/notificationsMiddleware.spec.js +++ b/backend/src/middleware/notifications/spec.js @@ -1,6 +1,6 @@ -import Factory from '../seed/factories' import { GraphQLClient } from 'graphql-request' -import { host, login } from '../jest/helpers' +import { host, login } from '../../jest/helpers' +import Factory from '../../seed/factories' const factory = Factory() let client