[bugfix] Use "comment" via /api/v1/instance

This commit is contained in:
tobi 2025-04-04 17:29:15 +02:00
commit 3409e6414c
8 changed files with 59 additions and 13 deletions

View file

@ -18,6 +18,7 @@
package admin
import (
"cmp"
"context"
"encoding/json"
"errors"
@ -239,7 +240,7 @@ func (p *Processor) importOrUpdateDomainPerm(
var (
domain = apiDomainPerm.Domain.Domain
obfuscate = apiDomainPerm.Obfuscate
publicComment = apiDomainPerm.PublicComment
publicComment = cmp.Or(apiDomainPerm.PublicComment, apiDomainPerm.Comment)
privateComment = apiDomainPerm.PrivateComment
subscriptionID = "" // No sub ID for imports.
)

View file

@ -106,9 +106,9 @@ func (p *Processor) InstancePeersGet(ctx context.Context, includeSuspended bool,
}
domains = append(domains, &apimodel.Domain{
Domain: d,
SuspendedAt: util.FormatISO8601(domainBlock.CreatedAt),
PublicComment: &domainBlock.PublicComment,
Domain: d,
SuspendedAt: util.FormatISO8601(domainBlock.CreatedAt),
Comment: &domainBlock.PublicComment,
})
}
}