chore: Remove GetSourceByName

- Introduced in 5455605342 and removed in
the same commit. Usage was purely testing code.
This commit is contained in:
Gusted 2025-01-31 11:44:22 +01:00
parent 1b10046e1a
commit 5423e22aeb
No known key found for this signature in database
GPG key ID: FD821B732837125F
3 changed files with 2 additions and 18 deletions

View file

@ -299,17 +299,6 @@ func GetSourceByID(ctx context.Context, id int64) (*Source, error) {
return source, nil
}
func GetSourceByName(ctx context.Context, name string) (*Source, error) {
source := &Source{}
has, err := db.GetEngine(ctx).Where("name = ?", name).Get(source)
if err != nil {
return nil, err
} else if !has {
return nil, ErrSourceNotExist{}
}
return source, nil
}
// UpdateSource updates a Source record in DB.
func UpdateSource(ctx context.Context, source *Source) error {
var originalSource *Source