mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-11-03 11:27:47 +00:00
load user details when deleting plugin
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"net/http"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
@@ -113,6 +114,10 @@ func (e mainEnv) getUserRequest(w http.ResponseWriter, r *http.Request, ps httpr
|
||||
appName := ""
|
||||
brief := ""
|
||||
change := ""
|
||||
action := ""
|
||||
if value, ok := requestInfo["action"]; ok {
|
||||
action = value.(string)
|
||||
}
|
||||
if value, ok := requestInfo["token"]; ok {
|
||||
userTOKEN = value.(string)
|
||||
event.Record = userTOKEN
|
||||
@@ -135,6 +140,9 @@ func (e mainEnv) getUserRequest(w http.ResponseWriter, r *http.Request, ps httpr
|
||||
if value, ok := requestInfo["brief"]; ok {
|
||||
brief = value.(string)
|
||||
}
|
||||
if strings.HasPrefix(action, "plugin") {
|
||||
brief = ""
|
||||
}
|
||||
if len(appName) > 0 {
|
||||
resultJSON, err = e.db.getUserApp(userTOKEN, appName)
|
||||
} else if len(brief) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user