mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
set member to admin
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { MessageRepositoryService } from '../../data/repository/message-respository.service';
|
||||
import { object, z } from 'zod';
|
||||
import { ValidateSchema } from 'src/app/services/decorators/validate-schema.decorator';
|
||||
|
||||
|
||||
const MessageReactionInputDTOSchema = z.object({
|
||||
@@ -8,7 +9,7 @@ const MessageReactionInputDTOSchema = z.object({
|
||||
messageId: z.string(),
|
||||
roomId: z.string(),
|
||||
reaction: z.string(),
|
||||
requestId: z.string()
|
||||
requestId: z.string().optional()
|
||||
})
|
||||
|
||||
export type MessageReactionInput = z.infer< typeof MessageReactionInputDTOSchema>
|
||||
@@ -22,6 +23,7 @@ export class MessageReactionUseCaseService {
|
||||
public repository: MessageRepositoryService
|
||||
) { }
|
||||
|
||||
@ValidateSchema(MessageReactionInputDTOSchema)
|
||||
execute(input: MessageReactionInput) {
|
||||
return this.repository.reactToMessage(input)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user