mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
edit message
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { z } from 'zod';
|
||||
import { MessageRepositoryService } from '../../data/repository/message-respository.service';
|
||||
|
||||
const MessageUpdateInputDTOSchema = z.object({
|
||||
memberId: z.number(),
|
||||
messageId: z.string(),
|
||||
roomId: z.string(),
|
||||
message: z.string(),
|
||||
requestId: z.string()
|
||||
})
|
||||
|
||||
export type MessageUpdateInput = z.infer< typeof MessageUpdateInputDTOSchema>
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MessageUpdateUseCaseService {
|
||||
|
||||
constructor(
|
||||
public repository: MessageRepositoryService
|
||||
) { }
|
||||
|
||||
execute(input: MessageUpdateInput) {
|
||||
this.repository.updateMessage(input);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user