mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-16 01:39:21 +02:00
add user to list by id
This commit is contained in:
parent
baf388cb42
commit
215930e3b9
|
@ -770,6 +770,9 @@ func NewHandler(s *service, verbose bool, staticDir string) http.Handler {
|
|||
id, _ := mux.Vars(c.r)["id"]
|
||||
q := c.r.URL.Query()
|
||||
uid := q.Get("uid")
|
||||
if uid == "" {
|
||||
uid = c.r.FormValue("uid")
|
||||
}
|
||||
err := s.ListAddUser(c, id, uid)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -37,6 +37,14 @@
|
|||
</span>
|
||||
<button type="submit"> Search </button>
|
||||
</form>
|
||||
<div class="page-title"> Add user by their ID </div>
|
||||
<span>some times it can works, some times not</span>
|
||||
<form class="user-list-action" action="/list/{{$.Data.List.ID}}/adduser?" method="POST">
|
||||
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
||||
<input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
|
||||
<input name="uid">
|
||||
<button type="submit"> Add </button>
|
||||
</form>
|
||||
|
||||
{{if .Q}}
|
||||
{{if .SearchAccounts}}
|
||||
|
|
Loading…
Reference in New Issue