added the ability to expand the models
This commit is contained in:
@@ -29,7 +29,7 @@ func deleteModelJSON(c *Context, id string) *Error {
|
||||
|
||||
func handleDelete(handle *Handle) {
|
||||
handle.Delete("/models/delete", func(c *Context) *Error {
|
||||
if c.CheckAuthLevel(1) {
|
||||
if !c.CheckAuthLevel(1) {
|
||||
return nil
|
||||
}
|
||||
var dat struct {
|
||||
@@ -66,6 +66,10 @@ func handleDelete(handle *Handle) {
|
||||
|
||||
case READY:
|
||||
fallthrough
|
||||
case READY_RETRAIN_FAILED:
|
||||
fallthrough
|
||||
case READY_ALTERATION_FAILED:
|
||||
fallthrough
|
||||
case CONFIRM_PRE_TRAINING:
|
||||
if dat.Name == nil {
|
||||
return c.JsonBadRequest("Provided name does not match the model name")
|
||||
|
||||
Reference in New Issue
Block a user