feat : journey
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-01-27 18:30:14 +08:00
parent da57f02191
commit 75c08d02f8
6 changed files with 105 additions and 12 deletions
@@ -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,
}))
}