diff --git a/apiGo/api/api/ApiBase.go b/apiGo/api/api/ApiBase.go index 9bb9ee5..8297d1b 100644 --- a/apiGo/api/api/ApiBase.go +++ b/apiGo/api/api/ApiBase.go @@ -15,22 +15,6 @@ const ( LoginNode = "login" ) -//type HandlerInfo struct { -// ID string -// Token string -// Data map[string]interface{} -//} - -//type actionStruct struct { -// Action string -//} - -//type Handler struct { -// action string -// handler api.PermUser, func(context api.Context) -// apiNode int -//} - func AddHandler(action string, apiNode string, perm uint8, handler func(ctx Context)) { http.Handle(fmt.Sprintf("/api/%s/%s", apiNode, action), http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) { srvPwd := settings.GetPassword() @@ -75,62 +59,3 @@ func ServerInit() { // initialize auth service and add corresponding auth routes InitOAuth() } - -//func handleAPICall(action string, requestBody string, apiNode int, context api.Context) { -// handler, ok := handlers[fmt.Sprintf("%s/%d", action, apiNode)] -// if !ok { -// // handler doesn't exist! -// fmt.Printf("no handler found for Action: %d/%s\n", apiNode, action) -// return nil -// } -// -// // check if info even exists -// if info == nil { -// info = &HandlerInfo{} -// } -// -// // parse the arguments -// var args map[string]interface{} -// err := json.Unmarshal([]byte(requestBody), &args) -// -// if err != nil { -// fmt.Printf("failed to decode arguments of action %s :: %s\n", action, requestBody) -// } else { -// // check if map has an action -// if _, ok := args["action"]; ok { -// delete(args, "action") -// } -// -// info.Data = args -// } -// -// // call the handler -// return handler.handler(info) -//} -// -//func handlefunc(rw http.ResponseWriter, req *http.Request, node int, tokenInfo *oauth2.TokenInfo) { -// // only allow post requests -// if req.Method != "POST" { -// return -// } -// -// buf := new(bytes.Buffer) -// buf.ReadFrom(req.Body) -// body := buf.String() -// -// var t actionStruct -// err := json.Unmarshal([]byte(body), &t) -// if err != nil { -// fmt.Println("failed to read action from request! :: " + body) -// } -// -// // load userid from received token object -// id := (*tokenInfo).GetClientID() -// -// userinfo := &HandlerInfo{ -// ID: id, -// Token: (*tokenInfo).GetCode(), -// } -// -// rw.Write(handleAPICall(t.Action, body, node, userinfo)) -//} diff --git a/src/elements/ActorTile/ActorTile.tsx b/src/elements/ActorTile/ActorTile.tsx index 96b590c..5a9183e 100644 --- a/src/elements/ActorTile/ActorTile.tsx +++ b/src/elements/ActorTile/ActorTile.tsx @@ -21,7 +21,7 @@ class ActorTile extends React.Component { if (this.props.onClick) { return this.renderActorTile(this.props.onClick); } else { - return {this.renderActorTile(() => {})}; + return {this.renderActorTile(() => {})}; } }