Minor updates and comments
This commit is contained in:
1 parent
ff65d9eadc
commit
0a95f847d4
5 files changed
+14
-3
No files matched your search
@@ -22,7 +22,7 @@ func ValidateID(id string) bool { // true: valid id, false: id already in use
|
||||
var foundID models.Id
|
||||
err := idCollection.FindOne(ctx, bson.M{"cid": id}).Decode(&foundID)
|
||||
cancel()
|
||||
if err != nil {
|
||||
if err != nil { // If there is no id found create new ID object to be stored and return true (unless insert error then try again)
|
||||
var newID models.Id
|
||||
newID.CID = id
|
||||
newID.ID = primitive.NewObjectID()
|
||||
|
||||
Reference in new issue
Block a user