generated from pkg/go-template
20 lines
432 B
Go
20 lines
432 B
Go
|
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)
|
||
|
}
|