mirror of
https://github.com/harness/drone.git
synced 2025-05-16 08:59:56 +08:00
repoStore findref fixed
This commit is contained in:
parent
5ab69952e2
commit
07a630c40b
@ -30,7 +30,7 @@ type CreateBranchInput struct {
|
||||
*/
|
||||
func (c *Controller) CreateBranch(ctx context.Context, session *auth.Session,
|
||||
repoRef string, in *CreateBranchInput) (*Branch, error) {
|
||||
repo, err := findRepoFromRef(ctx, c.repoStore, repoRef)
|
||||
repo, err := c.repoStore.FindRepoFromRef(ctx, repoRef)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ import (
|
||||
* DeletePath deletes a repo branch.
|
||||
*/
|
||||
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 {
|
||||
return err
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ func Handler() http.HandlerFunc {
|
||||
}
|
||||
|
||||
// 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("pragma", "no-cache")
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
|
Loading…
Reference in New Issue
Block a user