Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
0c0a35bc90 | |||
d346ca5237 | |||
a2c366392c | |||
e3d80f78fb |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/platformclient",
|
"name": "@serve.zone/platformclient",
|
||||||
"version": "1.0.2",
|
"version": "1.0.4",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "a module that makes it really easy to use the serve.zone platform inside your app",
|
"description": "a module that makes it really easy to use the serve.zone platform inside your app",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/platformclient',
|
name: '@serve.zone/platformclient',
|
||||||
version: '1.0.2',
|
version: '1.0.4',
|
||||||
description: 'a module that makes it really easy to use the serve.zone platform inside your app'
|
description: 'a module that makes it really easy to use the serve.zone platform inside your app'
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,14 @@ export class SzPlatformClient {
|
|||||||
public emailConnector = new SzEmailConnector(this);
|
public emailConnector = new SzEmailConnector(this);
|
||||||
public smsConnector = new SzSmsConnector(this);
|
public smsConnector = new SzSmsConnector(this);
|
||||||
|
|
||||||
constructor(authorizationStringArg: string) {
|
constructor(authorizationStringArg?: string) {
|
||||||
this.authorizationString = authorizationStringArg;
|
this.authorizationString = authorizationStringArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async init() {
|
public async init(authorizationStringArg?: string) {
|
||||||
|
if (authorizationStringArg) this.authorizationString = authorizationStringArg;
|
||||||
|
if (!this.authorizationString) this.authorizationString = process.env.SERVEZONE_PLATFROM_AUTHORIZATION;
|
||||||
|
if (!this.authorizationString) throw new Error('authorizationString is required');
|
||||||
this.typedsocket = await plugins.typedsocket.TypedSocket.createClient(this.typedrouter, await this.getConnectionAddress());
|
this.typedsocket = await plugins.typedsocket.TypedSocket.createClient(this.typedrouter, await this.getConnectionAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user