From 6986a10246e339cee1dcd3c5f8e18bc285123e0a Mon Sep 17 00:00:00 2001 From: Marvin Zhang Date: Wed, 7 Aug 2024 18:05:35 +0800 Subject: [PATCH] feat: updated password handling logic --- core/models/models/v2/database_v2.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/models/models/v2/database_v2.go b/core/models/models/v2/database_v2.go index 1d084a82..e09a6fb3 100644 --- a/core/models/models/v2/database_v2.go +++ b/core/models/models/v2/database_v2.go @@ -1,6 +1,8 @@ package models -import "time" +import ( + "time" +) type DatabaseV2 struct { any `collection:"databases"` @@ -13,7 +15,8 @@ type DatabaseV2 struct { URI string `json:"uri,omitempty" bson:"uri,omitempty"` Database string `json:"database,omitempty" bson:"database,omitempty"` Username string `json:"username,omitempty" bson:"username,omitempty"` - Password string `json:"-,omitempty" bson:"password,omitempty"` + Password string `json:"password,omitempty" bson:"-"` + EncryptedPassword string `json:"-,omitempty" bson:"encrypted_password,omitempty"` Status string `json:"status" bson:"status"` Error string `json:"error" bson:"error"` Active bool `json:"active" bson:"active"`