Add a project Page tab and a page origin per worktree and repo
This commit is contained in:
@@ -240,6 +240,14 @@ func (s *Server) GetProjectRaw(w http.ResponseWriter, r *http.Request, projectID
|
||||
serveRaw(w, r, p.RepoPath, params.Path)
|
||||
}
|
||||
|
||||
func (s *Server) GetRaw(w http.ResponseWriter, r *http.Request, params api.GetRawParams) {
|
||||
if !path.IsAbs(params.Path) {
|
||||
writeError(w, http.StatusBadRequest, fmt.Errorf("%s is not an absolute path", params.Path))
|
||||
return
|
||||
}
|
||||
serveRaw(w, r, "/", params.Path)
|
||||
}
|
||||
|
||||
func serveRaw(w http.ResponseWriter, r *http.Request, root, rel string) {
|
||||
if rel == "" {
|
||||
writeError(w, http.StatusBadRequest, errors.New("path is required"))
|
||||
|
||||
Reference in New Issue
Block a user