mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
reorganizde file path
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { z } from "zod";
|
||||
import { ValidateSchema } from 'src/app/services/decorators/validate-schema.decorator';
|
||||
import { RoomRemoteDataSourceService } from '../../../data/repository/room/room-remote-repository.service';
|
||||
|
||||
// Define the schema for the entire response
|
||||
const MemberSetAdminDTOSchema = z.object({
|
||||
roomId: z.string(),
|
||||
memberId: z.string()
|
||||
});
|
||||
|
||||
export type MemberSetAdminDTO = z.infer<typeof MemberSetAdminDTOSchema>
|
||||
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class MemberAdminUseCaseService {
|
||||
|
||||
constructor(
|
||||
public repository: RoomRemoteDataSourceService
|
||||
) { }
|
||||
|
||||
@ValidateSchema(MemberSetAdminDTOSchema)
|
||||
execute(input: MemberSetAdminDTO) {
|
||||
|
||||
return this.repository.setAmin(input)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user