backend/app/brahma/api/murder/internal/service/journey.go

20 lines
432 B
Go
Raw Permalink Normal View History

2022-01-27 18:30:14 +08:00
package service
import (
"git.icechen.cn/monorepo/backend/app/brahma/api/murder/internal/gorm_helper"
"git.icechen.cn/monorepo/backend/app/brahma/api/murder/internal/model"
"github.com/gofiber/fiber/v2"
"gorm.io/gorm"
)
func GetJourney(ctx *fiber.Ctx) (*model.Journey, error) {
var (
db *gorm.DB
err error
)
if db, err = gorm_helper.GetContextDB(ctx); err != nil {
return nil, err
}
return model.GetJourneyM(db)
}