Add delete option
All checks were successful
Build and Push Docker Image / build_and_push (push) Successful in 1m57s

This commit is contained in:
Arnaud Delcasse
2026-01-13 20:27:33 +01:00
parent 7adec6ee1d
commit eb884ab52d
11 changed files with 670 additions and 927 deletions

View File

@@ -152,6 +152,16 @@ func (s MongoDBStorage) UpdateGroup(group Group) error {
return nil
}
func (s MongoDBStorage) DeleteGroup(id string) error {
collection := s.Client.Database(s.DbName).Collection(s.Collections["groups"])
if _, err := collection.DeleteOne(context.TODO(), bson.M{"_id": id}); err != nil {
return err
}
return nil
}
/*********************************************************************************************************************************/
/*********************************************************Code********************************************************************/
/*********************************************************************************************************************************/