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 57a9bb9fab
commit 22122c45b2
20 changed files with 378 additions and 98 deletions
+6 -1
View File
@@ -217,7 +217,12 @@ func (p *prog) registerControlServerHandler() {
}
// Re-fetch pin code from API.
if rc, err := controld.FetchResolverConfig(cdUID, rootCmd.Version, cdDev); rc != nil {
rcReq := &controld.ResolverConfigRequest{
RawUID: cdUID,
Version: rootCmd.Version,
Metadata: ctrld.SystemMetadata(context.Background()),
}
if rc, err := controld.FetchResolverConfig(rcReq, cdDev); rc != nil {
if rc.DeactivationPin != nil {
cdDeactivationPin.Store(*rc.DeactivationPin)
} else {