mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix actions and draft data object
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SocketConnectionMCRService } from './socket-connection-mcr.service';
|
||||
|
||||
describe('SocketConnectionMCRService', () => {
|
||||
let service: SocketConnectionMCRService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(SocketConnectionMCRService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import * as signalR from "@microsoft/signalr"
|
||||
import { SessionStore } from '../store/session.service';
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SocketConnectionMCRService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
connect() {
|
||||
|
||||
var connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl("https://gdcmapi-dev.dyndns.info/FileHub", {
|
||||
accessTokenFactory: () => SessionStore.user.Authorization
|
||||
}).configureLogging(signalR.LogLevel.Information)
|
||||
.build()
|
||||
|
||||
|
||||
connection.on("ReceiveMessage", (message) => {
|
||||
console.log(message)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user