From 215930e3b950ceb224fc7a4f8dd652963f35d333 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Thu, 16 Nov 2023 01:56:58 +0300 Subject: [PATCH] add user to list by id --- service/transport.go | 3 +++ templates/list.tmpl | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/service/transport.go b/service/transport.go index 2d82035..ba7a94f 100644 --- a/service/transport.go +++ b/service/transport.go @@ -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 diff --git a/templates/list.tmpl b/templates/list.tmpl index dcc6ee8..bcdb6ea 100644 --- a/templates/list.tmpl +++ b/templates/list.tmpl @@ -37,6 +37,14 @@ +
Add user by their ID
+some times it can works, some times not +
+ + + + +
{{if .Q}} {{if .SearchAccounts}}