fix actions and draft data object

This commit is contained in:
Peter Maquiran
2024-01-17 10:25:16 +01:00
parent 69ee75b039
commit 4314ae1bff
35 changed files with 556 additions and 305 deletions
@@ -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)
})
}
}