debug logs and b64 non encodable
This commit is contained in:
@@ -4,15 +4,18 @@ import (
|
||||
"local/firestormy/config"
|
||||
"local/firestormy/config/ns"
|
||||
"local/firestormy/scheduler"
|
||||
"local/logb"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (s *Server) disable(w http.ResponseWriter, r *http.Request) {
|
||||
logb.Debugf("[access] disable %s", r.URL.Path)
|
||||
s.setDisabled(w, r, true)
|
||||
}
|
||||
|
||||
func (s *Server) enable(w http.ResponseWriter, r *http.Request) {
|
||||
logb.Debugf("[access] enable %s", r.URL.Path)
|
||||
s.setDisabled(w, r, false)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@ import (
|
||||
"local/firestormy/config"
|
||||
"local/firestormy/config/ns"
|
||||
"local/firestormy/scheduler"
|
||||
"local/logb"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (s *Server) delete(w http.ResponseWriter, r *http.Request) {
|
||||
logb.Debugf("[access] delete %s", r.URL.Path)
|
||||
keys := strings.Split(r.URL.Path, "/")
|
||||
key := keys[len(keys)-1]
|
||||
|
||||
|
||||
@@ -5,11 +5,13 @@ import (
|
||||
"local/firestormy/config"
|
||||
"local/firestormy/config/ns"
|
||||
"local/firestormy/scheduler"
|
||||
"local/logb"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (s *Server) get(w http.ResponseWriter, r *http.Request) {
|
||||
logb.Debugf("[access] get %s", r.URL.Path)
|
||||
keys := strings.Split(r.URL.Path, "/")
|
||||
key := keys[len(keys)-1]
|
||||
|
||||
|
||||
@@ -5,12 +5,15 @@ import (
|
||||
"local/firestormy/config"
|
||||
"local/firestormy/config/ns"
|
||||
"local/firestormy/scheduler"
|
||||
"local/logb"
|
||||
"net/http"
|
||||
"sort"
|
||||
)
|
||||
|
||||
func (s *Server) list(w http.ResponseWriter, r *http.Request) {
|
||||
logb.Debugf("[access] list %s", r.URL.Path)
|
||||
jobs, err := config.Store.List(ns.Jobs)
|
||||
logb.Debugf("[access] list : %v: %+v", err, jobs)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
@@ -4,11 +4,13 @@ import (
|
||||
"local/firestormy/config"
|
||||
"local/firestormy/config/ns"
|
||||
"local/firestormy/scheduler"
|
||||
"local/logb"
|
||||
"net/http"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (s *Server) run(w http.ResponseWriter, r *http.Request) {
|
||||
logb.Debugf("[access] run %s", r.URL.Path)
|
||||
keys := strings.Split(r.URL.Path, "/")
|
||||
key := keys[len(keys)-1]
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"local/firestormy/config"
|
||||
"local/firestormy/config/ns"
|
||||
"local/firestormy/scheduler"
|
||||
"local/logb"
|
||||
"net/http"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -63,6 +64,7 @@ func (u *upsertRequest) toJob() (*scheduler.Job, error) {
|
||||
}
|
||||
|
||||
func (s *Server) upsert(w http.ResponseWriter, r *http.Request) {
|
||||
logb.Debugf("[access] upsert %s", r.URL.Path)
|
||||
upsert, err := newUpsertRequest(r.Body)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
|
||||
Reference in New Issue
Block a user