fix(structure): format TypeScript
This commit is contained in:
parent
785acfaba4
commit
eae46e6461
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "@pushrocks/smartuniverse",
|
||||
"version": "1.0.16",
|
||||
"private": true,
|
||||
"description": "messaging service for your micro services",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
|
@ -66,11 +66,7 @@ export class Universe {
|
||||
// adds messages
|
||||
const addMessageHandler = new Handler('PUT', request => {
|
||||
const requestBody: IServerPutMessageRequestBody = request.body;
|
||||
const message = new UniverseMessage(
|
||||
requestBody.message,
|
||||
requestBody.payload,
|
||||
|
||||
)
|
||||
const message = new UniverseMessage(requestBody.message, requestBody.payload);
|
||||
this.universeStore.addMessage(message);
|
||||
console.log(requestBody);
|
||||
return true;
|
||||
|
@ -19,7 +19,7 @@ export class UniverseChannel {
|
||||
public static createChannel = (channelNameArg: string, passphraseArg: string) => {
|
||||
const newChannel = new UniverseChannel(channelNameArg, passphraseArg);
|
||||
return newChannel;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* the name of the channel
|
||||
|
@ -45,10 +45,7 @@ export class UniverseMessage {
|
||||
* @param messageArg
|
||||
* @param attachedPayloadArg
|
||||
*/
|
||||
constructor(
|
||||
messageArg: string,
|
||||
attachedPayloadArg: any
|
||||
) {
|
||||
constructor(messageArg: string, attachedPayloadArg: any) {
|
||||
this.timestamp = new TimeStamp();
|
||||
this.message = messageArg;
|
||||
this.attachedPayload = attachedPayloadArg;
|
||||
@ -71,8 +68,7 @@ export class UniverseMessage {
|
||||
} else {
|
||||
this.fallBackDestruction();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* prevents memory leaks if channels have no default
|
||||
|
Loading…
x
Reference in New Issue
Block a user