fix commit to hub

This commit is contained in:
Peter Maquiran
2024-02-09 10:33:53 +01:00
parent 8dca3a64a8
commit da49dd680a
6 changed files with 81 additions and 15 deletions
@@ -4,7 +4,7 @@ import { ObjectMergeNotification } from 'src/app/services/socket-connection-mcr.
import { CMAPIService } from "src/app/shared/repository/CMAPI/cmapi.service"
import { DomSanitizer } from '@angular/platform-browser';
const objectMergeNotification = new ObjectMergeNotification()
export enum UploadError {
noConnection = 'noConnection',
@@ -192,10 +192,10 @@ export class PublicationFormMV {
private UploadFileUseCase = new UploadFileUseCase()
private form = new PublicationFormModel()
ObjectMergeNotification = objectMergeNotification
ObjectMergeNotification = new ObjectMergeNotification()
constructor() {
this.ObjectMergeNotification.connect();
// this.ObjectMergeNotification.connect();
}
setDataToFrom(data: IPublicationFormModelEntity) {
@@ -218,11 +218,11 @@ export class PublicationFormMV {
PublicationAttachmentEntity.setChunkManger(fileChunks)
PublicationAttachmentEntity.chucksManager.registerOnLastChunk(() => {
this.ObjectMergeNotification.socket.commit(PublicationAttachmentEntity.chucksManager.path)
const guid = PublicationAttachmentEntity.chucksManager.path
this.ObjectMergeNotification.subscribe(guid, (data) => {
// console.log("data", data)
PublicationAttachmentEntity
resolve(true)
})
@@ -437,7 +437,7 @@ export class ChucksManager {
}
registerOnLastChunk(a: Function) {
this.onSetPath.push(a)
this.onSetLastChunk.push(a)
}
registerToUseCaseResponse(a: Function) {