Rename sitesQueries in serve and upload

This commit is contained in:
Melon 2025-01-08 17:52:23 +00:00
parent 40a52773f7
commit 4ecd88c0c0
Signed by: melon
GPG Key ID: 6C9D970C50D26A25
2 changed files with 6 additions and 6 deletions

View File

@ -45,17 +45,17 @@ const (
NoCacheQuery = "/?__bluebell-no-cache="
)
type sitesQueries interface {
type serveQueries interface {
GetLastUpdatedByDomainBranch(ctx context.Context, params database.GetLastUpdatedByDomainBranchParams) (time.Time, error)
}
func New(storage afero.Fs, db sitesQueries) *Handler {
func New(storage afero.Fs, db serveQueries) *Handler {
return &Handler{storage, db}
}
type Handler struct {
storageFs afero.Fs
db sitesQueries
db serveQueries
}
func cacheBuster(rw http.ResponseWriter, req *http.Request) {

View File

@ -27,11 +27,11 @@ var indexBranches = []string{
"master",
}
type sitesQueries interface {
type uploadQueries interface {
GetSiteByDomain(ctx context.Context, domain string) (database.Site, error)
}
func New(storage afero.Fs, db sitesQueries) *Handler {
func New(storage afero.Fs, db uploadQueries) *Handler {
return &Handler{storageFs: storage, db: db}
}
@ -39,7 +39,7 @@ const maxFileSize = 1 * humanize.GiByte
type Handler struct {
storageFs afero.Fs
db sitesQueries
db uploadQueries
mu syncmap.Map[string, *sync.Mutex]
}