added the ability to expand the models

This commit is contained in:
2024-04-08 14:17:13 +01:00
parent 274d7d22aa
commit de0b430467
15 changed files with 1086 additions and 197 deletions

View File

@@ -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")