Skip to content

Commit 9f5b8a7

Browse files
committed
Merge remote-tracking branch 'origin/release/v2.2.5' into issue-522-persona-imports
2 parents 489a37b + 9c61e3d commit 9f5b8a7

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Format based on [Keep a Changelog](http://keepachangelog.com/)
99
### Security
1010
### Migrations
1111

12+
## [2.2.5]
13+
1214
## [2.2.4]
1315
### Fixes
1416
- Ensure statementForwarding query is valid json. (#1138)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.4
1+
2.2.5

lib/models/statement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ schema.statics.aggregateByAuth = function aggregateByAuth(
233233
}).catch(cb);
234234
};
235235

236-
const mapDot = (data) => {
236+
export const mapDot = (data) => {
237237
if (isPlainObject(data)) {
238238
const mappedData = mapKeys(data, (value, key) => decodeDot(key));
239239
return mapValues(mappedData, mapDot);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "learning_locker",
33
"description": "An open source learning record store",
44
"license": "GPL-3.0",
5-
"version": "2.2.4",
5+
"version": "2.2.5",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/LearningLocker/learninglocker"

worker/src/handlers/statement/statementForwarding/statementForwardingRequestHandler.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as popsicle from 'popsicle';
22
import { assign } from 'lodash';
33
import { Map } from 'immutable';
44
import logger from 'lib/logger';
5-
import Statement from 'lib/models/statement';
5+
import Statement, { mapDot } from 'lib/models/statement';
66
import mongoose from 'mongoose';
77
import StatementForwarding from 'lib/models/statementForwarding';
88
import ForwardingRequestError from
@@ -33,13 +33,15 @@ const sendRequest = async (statement, statementForwarding) => {
3333
const urlString = `${statementForwarding.configuration
3434
.protocol}://${statementForwarding.configuration.url}`;
3535

36-
const statementContent = JSON.stringify(statement);
36+
const statementContent = JSON.stringify(mapDot(
37+
statement
38+
));
3739

3840
const headers = generateHeaders(statementContent, statementForwarding);
3941

4042
const requestOptions = {
4143
method: 'POST',
42-
body: statement,
44+
body: mapDot(statement),
4345
url: urlString,
4446
headers,
4547
timeout: 16000,

0 commit comments

Comments
 (0)