77 toggleEphemeralSchema ,
88 updateGroupPictureSchema ,
99 updateGroupSubjectSchema ,
10+ updateGroupDescriptionSchema ,
1011 groupInviteSchema ,
1112} from '../../validate/validate.schema' ;
1213import { RouterBroker } from '../abstract/abstract.router' ;
@@ -16,6 +17,7 @@ import {
1617 GroupJid ,
1718 GroupPictureDto ,
1819 GroupSubjectDto ,
20+ GroupDescriptionDto ,
1921 GroupUpdateParticipantDto ,
2022 GroupUpdateSettingDto ,
2123 GroupToggleEphemeralDto ,
@@ -57,6 +59,17 @@ export class GroupRouter extends RouterBroker {
5759
5860 res . status ( HttpStatus . CREATED ) . json ( response ) ;
5961 } )
62+ . put ( this . routerPath ( 'updateGroupDescription' ) , ...guards , async ( req , res ) => {
63+ const response = await this . groupValidate < GroupDescriptionDto > ( {
64+ request : req ,
65+ schema : updateGroupDescriptionSchema ,
66+ ClassRef : GroupDescriptionDto ,
67+ execute : ( instance , data ) =>
68+ groupController . updateGroupDescription ( instance , data ) ,
69+ } ) ;
70+
71+ res . status ( HttpStatus . CREATED ) . json ( response ) ;
72+ } )
6073 . get ( this . routerPath ( 'findGroupInfos' ) , ...guards , async ( req , res ) => {
6174 const response = await this . groupValidate < GroupJid > ( {
6275 request : req ,
0 commit comments