fix service api (#556)

* fix service api

* update ServiceResponseItem

* fix: ddns lock
This commit is contained in:
UUBulb
2024-12-05 21:00:02 +08:00
committed by GitHub
parent 2234cff5eb
commit 040c8df02e
10 changed files with 124 additions and 53 deletions

View File

@@ -23,8 +23,8 @@ import (
func listDDNS(c *gin.Context) ([]*model.DDNSProfile, error) {
var ddnsProfiles []*model.DDNSProfile
singleton.DDNSCacheLock.RLock()
defer singleton.DDNSCacheLock.RUnlock()
singleton.DDNSListLock.RLock()
defer singleton.DDNSListLock.RUnlock()
if err := copier.Copy(&ddnsProfiles, &singleton.DDNSList); err != nil {
return nil, err