mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
fix service api (#556)
* fix service api * update ServiceResponseItem * fix: ddns lock
This commit is contained in:
@@ -20,8 +20,8 @@ import (
|
||||
// @Success 200 {object} model.CommonResponse[[]model.Notification]
|
||||
// @Router /notification [get]
|
||||
func listNotification(c *gin.Context) ([]*model.Notification, error) {
|
||||
singleton.NotificationsLock.RLock()
|
||||
defer singleton.NotificationsLock.RUnlock()
|
||||
singleton.NotificationSortedLock.RLock()
|
||||
defer singleton.NotificationSortedLock.RUnlock()
|
||||
|
||||
var notifications []*model.Notification
|
||||
if err := copier.Copy(¬ifications, &singleton.NotificationListSorted); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user