mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-06 23:56:37 +08:00
refactor(plugins): restructure admin and message_gateway into standard layered sub-packages
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"Wavelet/plugins/domain/upload/models"
|
||||
"Wavelet/plugins/domain/upload/shared"
|
||||
"context"
|
||||
"errors"
|
||||
"strings"
|
||||
|
||||
"gorm.io/gorm"
|
||||
@@ -137,3 +138,9 @@ func ListUploadStats(ctx context.Context) ([]models.UploadStat, error) {
|
||||
}
|
||||
return stats, nil
|
||||
}
|
||||
|
||||
// IsRecordNotFound reports whether err is the persistence "record not found" sentinel.
|
||||
// Upper layers must use this helper instead of importing gorm directly.
|
||||
func IsRecordNotFound(err error) bool {
|
||||
return errors.Is(err, gorm.ErrRecordNotFound)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user