mirror of
https://github.com/1f349/site-hosting.git
synced 2025-01-20 14:16:36 +00:00
Rename sitesQueries in serve and upload
This commit is contained in:
parent
40a52773f7
commit
4ecd88c0c0
@ -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) {
|
||||
|
@ -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]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user