update
This commit is contained in:
@@ -34,10 +34,10 @@ func (a *app) list(w http.ResponseWriter, r *http.Request) {
|
||||
a.render.Render(ctx, w, config.List(ctx))
|
||||
case http.MethodPost:
|
||||
var q dto.SearchDto
|
||||
q.SearchTimeBegin, q.SearchTimeEnd = convertor.DefaultStartTimeAndEndTime(r.PostFormValue("timeBegin"), r.PostFormValue("timeEnd"))
|
||||
q.SearchTimeBegin, q.SearchTimeEnd = convertor.DefaultTime(r.PostFormValue("timeBegin"), r.PostFormValue("timeEnd"))
|
||||
q.SearchName = r.PostFormValue("name")
|
||||
q.Page = convertor.ConvertInt(r.PostFormValue("page"), 1)
|
||||
q.Rows = convertor.ConvertInt(r.PostFormValue("rows"), 10)
|
||||
q.Page = convertor.Int(r.PostFormValue("page"), 1)
|
||||
q.Rows = convertor.Int(r.PostFormValue("rows"), 10)
|
||||
ctx := r.Context()
|
||||
res, count, err := a.configService.List(ctx, q)
|
||||
if err != nil {
|
||||
@@ -71,7 +71,7 @@ func (a *app) edit(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (a *app) save(w http.ResponseWriter, r *http.Request) {
|
||||
id := convertor.ConvertInt[int32](r.PostFormValue("ID"), 0)
|
||||
id := convertor.Int[int32](r.PostFormValue("ID"), 0)
|
||||
key := r.PostFormValue("Key")
|
||||
value := r.PostFormValue("Value")
|
||||
if len(key) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user