fix(park):修正查询指定用户园区功能。

This commit is contained in:
徐涛 2023-06-09 06:06:04 +08:00
parent 2d17bd5f0d
commit 005f9020a1

View File

@ -68,9 +68,9 @@ func listParksBelongsToCurrentUser(c *fiber.Ctx) error {
// 列出隶属于指定用户的全部园区
func listParksBelongsTo(c *fiber.Ctx) error {
result := response.NewResult(c)
userId := c.Params("userId")
userId := c.Params("uid")
parkLog.Info("列出指定用户下的全部园区", zap.String("user id", userId))
parks, err := repository.ParkRepository.RetrieveParkBelongs(userId)
parks, err := repository.ParkRepository.ListAllParks(userId)
if err != nil {
parkLog.Error("无法获取园区列表。", zap.String("user id", userId))
return result.Error(http.StatusInternalServerError, err.Error())