22 lines
324 B
Go
22 lines
324 B
Go
package service
|
|
|
|
import (
|
|
"orbits-server/internal/server/database"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type CtlService struct {
|
|
db *gorm.DB
|
|
}
|
|
|
|
func NewControlService(db *gorm.DB) *CtlService {
|
|
return &CtlService{
|
|
db: db,
|
|
}
|
|
}
|
|
|
|
func (s *CtlService) ListLatestCommand() (database.Command, error) {
|
|
return database.LatestCommand(s.db)
|
|
}
|