Skip to content

Commit 549b047

Browse files
feat: add block key method (#24)
* feat: add block key method * chore: update package version * chore: new feature should dincrease minor, not patch * Update versioning * Update Key.js Co-authored-by: Artem Los <[email protected]>
1 parent 2fb1eee commit 549b047

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

methods/Key.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,22 @@ module.exports = class Key {
275275
}
276276
});
277277
}
278-
}
278+
279+
static BlockKey(token, ProductId, Key, LicenseServerUrl = "https://api.cryptolens.io") {
280+
return new Promise(async (resolve, reject) => {
281+
try {
282+
const formBody = {
283+
token: token,
284+
productId: ProductId,
285+
key: Key,
286+
}
287+
288+
const res = await helpers.CallAPI(`${LicenseServerUrl}/api/key/BlockKey`, formBody)
289+
resolve(res)
290+
} catch (error) {
291+
reject(error);
292+
}
293+
});
294+
}
295+
296+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cryptolens",
3-
"version": "1.0.11",
3+
"version": "1.0.12",
44
"description": "Client API for NodeJS to access Cryptolens Software Licensing API.",
55
"main": "main.js",
66
"scripts": {

0 commit comments

Comments
 (0)