add reaction to chat

This commit is contained in:
Peter Maquiran
2024-08-02 11:34:57 +01:00
parent 8774cef0b2
commit efc7f72042
10 changed files with 245 additions and 21 deletions
@@ -0,0 +1,28 @@
import { Injectable } from '@angular/core';
import { MessageRepositoryService } from '../../data/repository/message-respository.service';
import { object, z } from 'zod';
const MessageReactionInputDTOSchema = z.object({
memberId: z.number(),
messageId: z.string(),
roomId: z.string(),
reaction: z.string(),
requestId: z.string()
})
export type MessageReactionInput = z.infer< typeof MessageReactionInputDTOSchema>
@Injectable({
providedIn: 'root'
})
export class MessageReactionUseCaseService {
constructor(
public repository: MessageRepositoryService
) { }
execute(input: MessageReactionInput) {
return this.repository.reactToMessage(input)
}
}