repoStore findref fixed

This commit is contained in:
Enver Bisevac 2022-11-14 13:08:28 +01:00
parent 5ab69952e2
commit 07a630c40b
3 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ type CreateBranchInput struct {
*/ */
func (c *Controller) CreateBranch(ctx context.Context, session *auth.Session, func (c *Controller) CreateBranch(ctx context.Context, session *auth.Session,
repoRef string, in *CreateBranchInput) (*Branch, error) { repoRef string, in *CreateBranchInput) (*Branch, error) {
repo, err := findRepoFromRef(ctx, c.repoStore, repoRef) repo, err := c.repoStore.FindRepoFromRef(ctx, repoRef)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -18,7 +18,7 @@ import (
* DeletePath deletes a repo branch. * DeletePath deletes a repo branch.
*/ */
func (c *Controller) DeleteBranch(ctx context.Context, session *auth.Session, repoRef string, branchName string) error { func (c *Controller) DeleteBranch(ctx context.Context, session *auth.Session, repoRef string, branchName string) error {
repo, err := findRepoFromRef(ctx, c.repoStore, repoRef) repo, err := c.repoStore.FindRepoFromRef(ctx, repoRef)
if err != nil { if err != nil {
return err return err
} }

View File

@ -45,7 +45,7 @@ func Handler() http.HandlerFunc {
} }
// Disable caching and sniffing via HTTP headers for UI main entry resources // Disable caching and sniffing via HTTP headers for UI main entry resources
if (r.URL.Path == "/" || r.URL.Path == "/remoteEntry.js" || r.URL.Path == "/index.html") { if r.URL.Path == "/" || r.URL.Path == "/remoteEntry.js" || r.URL.Path == "/index.html" {
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate;") w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate;")
w.Header().Set("pragma", "no-cache") w.Header().Set("pragma", "no-cache")
w.Header().Set("X-Content-Type-Options", "nosniff") w.Header().Set("X-Content-Type-Options", "nosniff")