2024-08-02 16:20:26 +01:00
|
|
|
import { Injectable } from '@angular/core';
|
2024-08-19 16:01:58 +01:00
|
|
|
import { MessageLocalDataSourceService } from '../../../data/repository/message/message-local-data-source.service';
|
2024-08-02 16:20:26 +01:00
|
|
|
import { MessageOutPutDataDTO } from '../../../data/dto/message/messageOutputDTO';
|
|
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
|
providedIn: 'root'
|
|
|
|
|
})
|
|
|
|
|
export class SocketMessageDeleteUseCaseService {
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
private messageLocalDataSourceService: MessageLocalDataSourceService
|
|
|
|
|
) { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async execute(input: MessageOutPutDataDTO) {
|
|
|
|
|
const result = await this.messageLocalDataSourceService.deleteByMessageId(input.id)
|
|
|
|
|
|
|
|
|
|
if(result.isOk()) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
console.log(result.error)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|