forked from free-lancers/electricity_bill_calc_service
fix(park):修正园区信息检索。
This commit is contained in:
@@ -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())
|
||||
|
Reference in New Issue
Block a user