Including system metadata when posting to utility API

This commit is contained in:
Cuong Manh Le
2025-12-10 17:43:57 +07:00
committed by Cuong Manh Le
parent 8b92dc97a3
commit ba3dd3a4b0
20 changed files with 374 additions and 119 deletions
+6 -1
View File
@@ -220,7 +220,12 @@ func (p *prog) registerControlServerHandler() {
loggerCtx := ctrld.LoggerCtx(context.Background(), p.logger.Load())
// Re-fetch pin code from API.
if rc, err := controld.FetchResolverConfig(loggerCtx, cdUID, appVersion, cdDev); rc != nil {
rcReq := &controld.ResolverConfigRequest{
RawUID: cdUID,
Version: appVersion,
Metadata: ctrld.SystemMetadata(loggerCtx),
}
if rc, err := controld.FetchResolverConfig(loggerCtx, rcReq, cdDev); rc != nil {
if rc.DeactivationPin != nil {
cdDeactivationPin.Store(*rc.DeactivationPin)
} else {