fix(park):修正园区信息检索。

This commit is contained in:
徐涛
2023-06-08 22:23:56 +08:00
parent 2f17853dc0
commit 2d17bd5f0d
2 changed files with 10 additions and 4 deletions

View File

@@ -57,7 +57,7 @@ func listParksBelongsToCurrentUser(c *fiber.Ctx) error {
return result.Unauthorized(err.Error())
}
parkLog.Info("列出当前用户下的全部园区", zap.String("user id", session.Uid))
parks, err := repository.ParkRepository.RetrieveParkbelongs(session.Uid)
parks, err := repository.ParkRepository.ListAllParks(session.Uid)
if err != nil {
parkLog.Error("无法获取园区列表。", zap.String("user id", session.Uid))
return result.Error(http.StatusInternalServerError, err.Error())
@@ -70,7 +70,7 @@ func listParksBelongsTo(c *fiber.Ctx) error {
result := response.NewResult(c)
userId := c.Params("userId")
parkLog.Info("列出指定用户下的全部园区", zap.String("user id", userId))
parks, err := repository.ParkRepository.RetrieveParkbelongs(userId)
parks, err := repository.ParkRepository.RetrieveParkBelongs(userId)
if err != nil {
parkLog.Error("无法获取园区列表。", zap.String("user id", userId))
return result.Error(http.StatusInternalServerError, err.Error())