Skip to content

Commit

Permalink
Release 1.5.70
Browse files Browse the repository at this point in the history
  • Loading branch information
Lomilar committed Nov 23, 2024
1 parent 5c46678 commit 6ad2a90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/com/eduworks/ec/promises/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ module.exports = {
p = p.catch(failure);
return p;
},
cassReturnNullAsPromise: function (success, failure, error) {
let p = new Promise((resolve, reject) => {
resolve(null);
});
if (success !== undefined && success != null && failure !== undefined && failure != null)
p = p.then(success, failure);
else if (success !== undefined && success != null)
p = p.then(success);
else if (failure !== undefined && failure != null)
p = p.catch(failure);
return p;
},
cassReturnAsPromise: function (o, success, failure, error) {
let p = new Promise((resolve, reject) => {
if (o === undefined || o == null) {
Expand Down
3 changes: 2 additions & 1 deletion src/org/cassproject/ebac/repository/EcRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ const EcIdentityManager = require("../identity/EcIdentityManager");
const EcRekeyRequest = require("../identity/EcRekeyRequest");
const EcArray = require("../../../../com/eduworks/ec/array/EcArray");
const EcRemote = require("../../../../com/eduworks/ec/remote/EcRemote");
const { cassPromisify, cassReturnAsPromise } = require("../../../../com/eduworks/ec/promises/helpers");
const { cassPromisify, cassReturnAsPromise, cassReturnNullAsPromise } = require("../../../../com/eduworks/ec/promises/helpers");
const EcRemoteLinkedData = require("../../schema/general/EcRemoteLinkedData");
const EcCrypto = require("../../../../com/eduworks/ec/crypto/EcCrypto");
const EcIdentity = require("../identity/EcIdentity");
const EcPpkFacade = require("../../../../com/eduworks/ec/crypto/EcPpkFacade");
const EcPk = require("../../../../com/eduworks/ec/crypto/EcPk");
const EcLinkedData = require("../../../json/ld/EcLinkedData.js");
require("../../general/AuditLogger.js")

/**
Expand Down
1 change: 1 addition & 0 deletions src/test/EcRepository.l2.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const EcEncryptedValue = require('../org/cassproject/ebac/repository/EcEncrypted
const EcIdentityManager = require('../org/cassproject/ebac/identity/EcIdentityManager.js');
const EcIdentity = require('../org/cassproject/ebac/identity/EcIdentity.js');
const EcPpk = require('../com/eduworks/ec/crypto/EcPpk.js');
const EcLinkedData = require('../org/json/ld/EcLinkedData.js');

let hrtime = function () {
try {
Expand Down

0 comments on commit 6ad2a90

Please sign in to comment.