From 341e91b2360b866d7261b4c1edf97f62fb614ff6 Mon Sep 17 00:00:00 2001 From: liuzx Date: Thu, 17 Feb 2022 14:59:49 +0800 Subject: [PATCH] fix-bug --- routers/routes/routes.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 840d6cf47..0f1abe5e8 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -1031,14 +1031,22 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/modelarts", func() { m.Group("/notebook", func() { + // m.Group("/:jobid", func() { + // m.Get("", reqRepoCloudBrainReader, repo.NotebookShow) + // m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug) + // m.Post("/:action", reqRepoCloudBrainWriter, repo.NotebookManage) + // m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.NotebookDel) + // }) + // m.Get("/create", reqRepoCloudBrainWriter, repo.NotebookNew) + // m.Post("/create", reqRepoCloudBrainWriter, bindIgnErr(auth.CreateModelArtsNotebookForm{}), repo.NotebookCreate) m.Group("/:jobid", func() { m.Get("", reqRepoCloudBrainReader, repo.NotebookShow) - m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug) + m.Get("/debug", cloudbrain.AdminOrJobCreaterRight, repo.NotebookDebug2) m.Post("/:action", reqRepoCloudBrainWriter, repo.NotebookManage) m.Post("/del", cloudbrain.AdminOrOwnerOrJobCreaterRight, repo.NotebookDel) }) m.Get("/create", reqRepoCloudBrainWriter, repo.NotebookNew) - m.Post("/create", reqRepoCloudBrainWriter, bindIgnErr(auth.CreateModelArtsNotebookForm{}), repo.NotebookCreate) + m.Post("/create", reqRepoCloudBrainWriter, bindIgnErr(auth.CreateModelArtsNotebookForm{}), repo.Notebook2Create) }) m.Group("/train-job", func() {