feat: add button to remove image from class
This commit is contained in:
@@ -95,6 +95,16 @@ func (x *Handle) Delete(path string, fn func(c *Context) *Error) {
|
||||
x.deletes = append(x.deletes, HandleFunc{path, fn})
|
||||
}
|
||||
|
||||
func (x *Handle) DeleteAuth(path string, authLevel int, fn func(c *Context) *Error) {
|
||||
inner_fn := func(c *Context) *Error {
|
||||
if !c.CheckAuthLevel(authLevel) {
|
||||
return nil
|
||||
}
|
||||
return fn(c)
|
||||
}
|
||||
x.posts = append(x.posts, HandleFunc{path, inner_fn})
|
||||
}
|
||||
|
||||
func (x *Handle) handleGets(context *Context) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
|
||||
@@ -204,7 +204,7 @@ func MyParseForm(r *http.Request) (vs url.Values, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type JustId struct{ Id string }
|
||||
type JustId struct{ Id string `json:"id" validate:"required"` }
|
||||
|
||||
type Generic struct{ reflect.Type }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user