mirror of
https://github.com/outbackdingo/databunker.git
synced 2026-01-27 10:18:45 +00:00
adding global delete code
This commit is contained in:
@@ -215,6 +215,7 @@ func (e mainEnv) approveUserRequest(w http.ResponseWriter, r *http.Request, ps h
|
||||
return
|
||||
}
|
||||
if action == "forget-me" {
|
||||
e.globalUserDelete(userTOKEN)
|
||||
result, err := e.db.deleteUserRecord(resultJSON, userTOKEN)
|
||||
if err != nil {
|
||||
returnError(w, r, "internal error", 405, err, event)
|
||||
@@ -252,7 +253,10 @@ func (e mainEnv) approveUserRequest(w http.ResponseWriter, r *http.Request, ps h
|
||||
mode := "token"
|
||||
lastmodifiedby := "admin"
|
||||
e.db.withdrawAgreement(userTOKEN, brief, mode, userTOKEN, lastmodifiedby)
|
||||
}
|
||||
} else if action == "plugin-delete" {
|
||||
pluginid := requestInfo["brief"].(string)
|
||||
e.pluginUserDelete(pluginid, userTOKEN)
|
||||
}
|
||||
e.db.updateRequestStatus(request, "approved", "")
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
w.WriteHeader(200)
|
||||
|
||||
Reference in New Issue
Block a user