generated from pkg/go-template
@@ -0,0 +1,27 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.icechen.cn/monorepo/backend/app/brahma/api/murder/internal/error_process"
|
||||
"git.icechen.cn/monorepo/backend/app/brahma/api/murder/internal/service"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
ctxLogger "github.com/luizsuper/ctxLoggers"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
func GetJourneyH(ctx *fiber.Ctx) error {
|
||||
journey, err := service.GetJourney(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
ctxLogger.FError(ctx, error_process.ServiceErr, zap.String("", fmt.Sprintf("%+v", err)))
|
||||
return ctx.JSON(fail(nil))
|
||||
}
|
||||
|
||||
return ctx.JSON(success(&Data{
|
||||
Elements: journey,
|
||||
Total: 64,
|
||||
}))
|
||||
}
|
||||
Reference in New Issue
Block a user