diff --git a/modules/convert/cloudbrain.go b/modules/convert/cloudbrain.go index 1487f468e..599da4800 100644 --- a/modules/convert/cloudbrain.go +++ b/modules/convert/cloudbrain.go @@ -104,6 +104,7 @@ func ToSpecification(s *models.Specification) *api.SpecificationShow { func ToTagger(user *models.User) *api.Tagger { return &api.Tagger{ + ID: user.ID, Name: user.Name, RelAvatarURL: user.RelAvatarLink(), Email: user.Email, diff --git a/modules/structs/tagger.go b/modules/structs/tagger.go index 8933c8c5c..c32ad8040 100644 --- a/modules/structs/tagger.go +++ b/modules/structs/tagger.go @@ -1,6 +1,7 @@ package structs type Tagger struct { + ID int64 `json:"id"` Name string `json:"name"` Email string `json:"email"` RelAvatarURL string `json:"relAvatarURL"` diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index a8d250908..ea4974c54 100755 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -738,7 +738,7 @@ func RegisterRoutes(m *macaron.Macaron) { }, reqToken(), repoAssignment()) m.Group("/file_notebook", func() { - m.Get("", reqToken(), repo.GetFileNoteBookInfo) + m.Get("", repo.GetFileNoteBookInfo) m.Post("/create", reqToken(), reqWeChat(), bind(api.CreateFileNotebookJobOption{}), repo.CreateFileNoteBook) }) diff --git a/web_src/vuepages/pages/notebook/debug/index.vue b/web_src/vuepages/pages/notebook/debug/index.vue index 77b2a7603..cac76a883 100644 --- a/web_src/vuepages/pages/notebook/debug/index.vue +++ b/web_src/vuepages/pages/notebook/debug/index.vue @@ -342,6 +342,9 @@ export default { }).catch((err)=>{ if(err.response.status===403 && err.response.data.code===1 ){ location.href=`${AppSubUrl}/authentication/wechat/bind` + } + if(err.response.status===401){ + location.href=`${AppSubUrl}/user/login` } this.btnStatus[index]=0 this.alertCb = false