mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add readAt and delete message
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { z } from 'zod';
|
||||
import { MessageRepositoryService } from '../../data/repository/message-respository.service';
|
||||
|
||||
export const MessageDeleteInputDTOSchema = z.object({
|
||||
requestId: z.string(),
|
||||
roomId: z.string(),
|
||||
messageId: z.string(),
|
||||
senderId: z.number(),
|
||||
});
|
||||
export type MessageDeleteInputDTO = z.infer<typeof MessageDeleteInputDTOSchema>
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MessageDeleteLiveUseCaseService {
|
||||
constructor(
|
||||
public repository: MessageRepositoryService
|
||||
) { }
|
||||
|
||||
async execute(data: MessageDeleteInputDTO) {
|
||||
return this.repository.sendMessageDelete(data)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user