From 8849dda9c4fd92467e2c05c15ea483abae6af8e5 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期三, 12 八月 2020 11:25:39 +0800 Subject: [PATCH] add testPush --- controllers/user.go | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/controllers/user.go b/controllers/user.go index 26ca81b..927a38f 100644 --- a/controllers/user.go +++ b/controllers/user.go @@ -186,4 +186,17 @@ } +// @router /sync [get] +func (u *UserController) Sync() { + resp := code.Code{} + syncCount := service.SyncHikPerson() + resp.Success = true + resp.Status = http.StatusOK + resp.Data = map[string]interface{}{ + "syncCount": syncCount, + } + + u.Data["json"] = resp + u.ServeJSON() +} -- Gitblit v1.8.0