55 updateParticipantsSchema ,
66 updateSettingsSchema ,
77 toggleEphemeralSchema ,
8- updateGroupPicture ,
8+ updateGroupPictureSchema ,
9+ updateGroupSubjectSchema ,
910 groupInviteSchema ,
1011} from '../../validate/validate.schema' ;
1112import { RouterBroker } from '../abstract/abstract.router' ;
@@ -14,6 +15,7 @@ import {
1415 GroupInvite ,
1516 GroupJid ,
1617 GroupPictureDto ,
18+ GroupSubjectDto ,
1719 GroupUpdateParticipantDto ,
1820 GroupUpdateSettingDto ,
1921 GroupToggleEphemeralDto ,
@@ -35,10 +37,20 @@ export class GroupRouter extends RouterBroker {
3537
3638 res . status ( HttpStatus . CREATED ) . json ( response ) ;
3739 } )
40+ . put ( this . routerPath ( 'updateGroupSubject' ) , ...guards , async ( req , res ) => {
41+ const response = await this . groupValidate < GroupSubjectDto > ( {
42+ request : req ,
43+ schema : updateGroupSubjectSchema ,
44+ ClassRef : GroupSubjectDto ,
45+ execute : ( instance , data ) => groupController . updateGroupSubject ( instance , data ) ,
46+ } ) ;
47+
48+ res . status ( HttpStatus . CREATED ) . json ( response ) ;
49+ } )
3850 . put ( this . routerPath ( 'updateGroupPicture' ) , ...guards , async ( req , res ) => {
3951 const response = await this . groupValidate < GroupPictureDto > ( {
4052 request : req ,
41- schema : updateGroupPicture ,
53+ schema : updateGroupPictureSchema ,
4254 ClassRef : GroupPictureDto ,
4355 execute : ( instance , data ) => groupController . updateGroupPicture ( instance , data ) ,
4456 } ) ;
0 commit comments