Repository: syncthing/syncthing (language: go)

Issue:
The response of "pending" APIs has changed as of Syncthing v1.29.0
### What happened?

The routes for querying [pending devices](https://docs.syncthing.net/rest/cluster-pending-devices-get.html) and [pending folders](https://docs.syncthing.net/rest/cluster-pending-folders-get.html) used to return fields starting with a lower-case character like `time` and `receiveEncrypted` as per the linked documentation. As of v1.29.0 the routes return fields starting with an upper-case character like `Time` and `ReceiveEncrypted`. This is probably an unintended side-effect of the refactoring again.

This time it also affects the GUI, e.g. one gets a message like `some-device wants to share folder "" (stt-test-2). Add new folder?` where the folder label is missing. (The message is displayed correctly when it is shown while the page has already been opened. So the response from the corresponding event API is probably not affected.)

### Syncthing version

v1.29.0

### Platform & operating system

all

### Browser version

_No response_

### Relevant log output

_No response_


Discussion / hints:

Fix patch:
diff --git a/lib/db/observed.go b/lib/db/observed.go
index 1f549221e3a..47705b6139e 100644
--- a/lib/db/observed.go
+++ b/lib/db/observed.go
@@ -18,10 +18,10 @@ import (
 )
 
 type ObservedFolder struct {
-	Time             time.Time
-	Label            string
-	ReceiveEncrypted bool
-	RemoteEncrypted  bool
+	Time             time.Time `json:"time"`
+	Label            string    `json:"label"`
+	ReceiveEncrypted bool      `json:"receiveEncrypted"`
+	RemoteEncrypted  bool      `json:"remoteEncrypted"`
 }
 
 func (o *ObservedFolder) toWire() *dbproto.ObservedFolder {
@@ -41,9 +41,9 @@ func (o *ObservedFolder) fromWire(w *dbproto.ObservedFolder) {
 }
 
 type ObservedDevice struct {
-	Time    time.Time
-	Name    string
-	Address string
+	Time    time.Time `json:"time"`
+	Name    string    `json:"name"`
+	Address string    `json:"address"`
 }
 
 func (o *ObservedDevice) fromWire(w *dbproto.ObservedDevice) {


Test patch: