From 52fb59cc01a0af8c8bbfa6368f31063c14c3834c Mon Sep 17 00:00:00 2001
From: rick <rick@gnous.eu>
Date: Sat, 29 Oct 2022 23:07:29 +0200
Subject: [PATCH] add field id in group

---
 front/src/components/mod.rs | 1 +
 models/group.go             | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/front/src/components/mod.rs b/front/src/components/mod.rs
index 908c6a4..281afc4 100644
--- a/front/src/components/mod.rs
+++ b/front/src/components/mod.rs
@@ -29,6 +29,7 @@ struct Game {
 
 #[derive(Clone, Debug, Deserialize, PartialEq, Serialize)]
 pub struct Group {
+    pub id: String,
     pub name: String,
     pub game: String,
 }
diff --git a/models/group.go b/models/group.go
index 08cf4b4..3508fab 100644
--- a/models/group.go
+++ b/models/group.go
@@ -3,7 +3,7 @@ package models
 import "go.mongodb.org/mongo-driver/bson/primitive"
 
 type Group struct {
-	Id      primitive.ObjectID   `bson:"_id", omitempty`
+	Id      primitive.ObjectID   `bson:"_id" json:"id", omitempty`
 	Name    string               `bson:"name" json:"name"`
 	Desc    string               `bson:"desc"`
 	NbMax   int                  `bson:"nbMax"`