refactor(server): finish the Org to Instance rename

Private identifiers plan 0b's naming map missed, plus the OrgOIDC model type.
No wire format, database field or route changes.
This commit is contained in:
2026-07-24 15:07:06 +01:00
parent 6fde319b2f
commit c3e363eccc
6 changed files with 29 additions and 29 deletions
+3 -3
View File
@@ -10,10 +10,10 @@ import (
"go.mongodb.org/mongo-driver/v2/mongo/options"
)
func GetInstanceOIDC(instanceID string) (*models.OrgOIDC, error) {
func GetInstanceOIDC(instanceID string) (*models.InstanceOIDC, error) {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
var o models.OrgOIDC
var o models.InstanceOIDC
err := db.Col("instance_oidc").FindOne(ctx, bson.M{"instance_id": instanceID}).Decode(&o)
if err != nil {
return nil, err
@@ -29,7 +29,7 @@ func GetInstanceOIDCSecret(instanceID string) (string, error) {
return decryptString(o.ClientSecretEnc)
}
func SaveOrgOIDC(instanceID, issuer, clientID, clientSecret string, enabled bool) error {
func SaveInstanceOIDC(instanceID, issuer, clientID, clientSecret string, enabled bool) error {
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
set := bson.M{