Skip to content

Commit ffb14c9

Browse files
committed
profileeditor: add created_at, srvModified too on save to simulate API v3
1 parent 6b841fa commit ffb14c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/profile/profileeditor.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ var init = function init () {
312312
profileSubmit();
313313
}
314314
GUIToObject();
315-
mongorecords.push(_.omit(mongorecords[currentrecord], ['_id', 'srvModified', 'srvCreated', 'identifier']));
315+
mongorecords.push(_.omit(mongorecords[currentrecord], ['_id', 'srvModified', 'srvCreated', 'identifier', 'mills']));
316316
currentrecord = mongorecords.length - 1;
317317
mongorecords[currentrecord].startDate = new Date().toISOString();
318318
currentprofile = mongorecords[currentrecord].defaultProfile;
@@ -651,6 +651,8 @@ var init = function init () {
651651
profileChange(event);
652652
var record = mongorecords[currentrecord];
653653
record.startDate = new Date(client.utils.mergeInputTime(timeInput.val(), dateInput.val())).toISOString( );
654+
record.created_at = new Date().toISOString( );
655+
record.srvModified = new Date().getTime(); // remove when switching to v3 API
654656

655657
var adjustedRecord = _.cloneDeep(record);
656658

0 commit comments

Comments
 (0)