HEAVY: finish music service migration, tidy up services, more tests
This commit is contained in:
parent
9e311df462
commit
90a671982c
47 changed files with 2698 additions and 902 deletions
|
|
@ -3,6 +3,7 @@ package log
|
|||
import (
|
||||
"arimelody-web/model"
|
||||
repository "arimelody-web/repository/log"
|
||||
"arimelody-web/errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"time"
|
||||
|
|
@ -43,7 +44,10 @@ func (s *LogService) Warn(logType string, format string, args ...any) {
|
|||
}
|
||||
|
||||
func (s *LogService) Fetch(id string) (*model.Log, error) {
|
||||
return s.repo.Get(id)
|
||||
log, err := s.repo.Get(id)
|
||||
if err != nil { return nil, err }
|
||||
if log == nil { return nil, errors.NewNotExistError("Log does not exist") }
|
||||
return log, nil
|
||||
}
|
||||
|
||||
func (s *LogService) Search(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue