@fortmatic/admin
Advanced tools
Comparing version 2.0.0 to 2.0.1
import { BaseModule } from '../base-module'; | ||
export declare class UsersModule extends BaseModule { | ||
logoutByPublicAddress(publicAddress: string): Promise<import("node-fetch").Response>; | ||
logoutByPublicAddress(public_address: string): Promise<import("node-fetch").Response>; | ||
logoutByToken(DIDToken: string): Promise<import("node-fetch").Response>; | ||
} |
@@ -63,3 +63,3 @@ "use strict"; | ||
} | ||
UsersModule.prototype.logoutByPublicAddress = function (publicAddress) { | ||
UsersModule.prototype.logoutByPublicAddress = function (public_address) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
@@ -70,3 +70,3 @@ var body; | ||
throw sdk_exceptions_1.createApiKeyMissingError(); | ||
body = JSON.stringify({ publicaddress: publicAddress }); | ||
body = JSON.stringify({ public_address: public_address }); | ||
return [2 /*return*/, node_fetch_1.default(this.sdk.apiBaseUrl + "/v1/admin/auth/user/logout", { | ||
@@ -82,8 +82,8 @@ method: 'POST', | ||
return __awaiter(this, void 0, void 0, function () { | ||
var publicAddress, body; | ||
var public_address, body; | ||
return __generator(this, function (_a) { | ||
if (!this.sdk.secretApiKey) | ||
throw sdk_exceptions_1.createApiKeyMissingError(); | ||
publicAddress = this.sdk.token.getPublicAddress(DIDToken); | ||
body = JSON.stringify({ publicaddress: publicAddress }); | ||
public_address = this.sdk.token.getPublicAddress(DIDToken); | ||
body = JSON.stringify({ public_address: public_address }); | ||
return [2 /*return*/, node_fetch_1.default(this.sdk.apiBaseUrl + "/v1/admin/auth/user/logout", { | ||
@@ -90,0 +90,0 @@ method: 'POST', |
{ | ||
"name": "@fortmatic/admin", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Fortmatic Javascript Admin SDK", | ||
@@ -5,0 +5,0 @@ "author": "Fortmatic <team@fortmatic.com> (https://fortmatic.com/)", |
@@ -6,6 +6,6 @@ import fetch from 'node-fetch'; | ||
export class UsersModule extends BaseModule { | ||
public async logoutByPublicAddress(publicAddress: string) { | ||
public async logoutByPublicAddress(public_address: string) { | ||
if (!this.sdk.secretApiKey) throw createApiKeyMissingError(); | ||
const body = JSON.stringify({ publicaddress: publicAddress }); | ||
const body = JSON.stringify({ public_address }); | ||
@@ -22,4 +22,4 @@ return fetch(`${this.sdk.apiBaseUrl}/v1/admin/auth/user/logout`, { | ||
const publicAddress = this.sdk.token.getPublicAddress(DIDToken); | ||
const body = JSON.stringify({ publicaddress: publicAddress }); | ||
const public_address = this.sdk.token.getPublicAddress(DIDToken); | ||
const body = JSON.stringify({ public_address }); | ||
@@ -26,0 +26,0 @@ return fetch(`${this.sdk.apiBaseUrl}/v1/admin/auth/user/logout`, { |
@@ -22,3 +22,3 @@ import test from 'ava'; | ||
headers: { 'X-Fortmatic-Secret-key': API_KEY }, | ||
body: '{"publicaddress":"0x0123"}', | ||
body: '{"public_address":"0x0123"}', | ||
}, | ||
@@ -25,0 +25,0 @@ ]); |
@@ -26,3 +26,3 @@ import test from 'ava'; | ||
headers: { 'X-Fortmatic-Secret-key': API_KEY }, | ||
body: '{"publicaddress":"0x0123"}', | ||
body: '{"public_address":"0x0123"}', | ||
}, | ||
@@ -29,0 +29,0 @@ ]); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68399