diff --git a/src/github.com/leanote/leanote/app/controllers/AuthController.go b/src/github.com/leanote/leanote/app/controllers/AuthController.go index b3dd23c..b86137b 100644 --- a/src/github.com/leanote/leanote/app/controllers/AuthController.go +++ b/src/github.com/leanote/leanote/app/controllers/AuthController.go @@ -85,7 +85,7 @@ func (c Auth) Logout() revel.Result { // 体验一下 func (c Auth) Demo() revel.Result { - email := configService.GetGlobalStringConfig("demoPassword") + email := configService.GetGlobalStringConfig("demoUsername") pwd := configService.GetGlobalStringConfig("demoPassword"); userInfo, err := authService.Login(email, pwd) if err != nil { diff --git a/src/github.com/leanote/leanote/app/service/NotebookService.go b/src/github.com/leanote/leanote/app/service/NotebookService.go index a94de3f..dad005d 100644 --- a/src/github.com/leanote/leanote/app/service/NotebookService.go +++ b/src/github.com/leanote/leanote/app/service/NotebookService.go @@ -275,11 +275,15 @@ func (this *NotebookService) ToBlog(userId, notebookId string, isBlog bool) (boo // 查看是否有子notebook // 先查看该notebookId下是否有notes, 没有则删除 func (this *NotebookService) DeleteNotebook(userId, notebookId string) (bool, string) { - if db.Count(db.Notebooks, bson.M{"ParentNotebookId": bson.ObjectIdHex(notebookId), - "UserId": bson.ObjectIdHex(userId)}) == 0 { // 无 + if db.Count(db.Notebooks, bson.M{ + "ParentNotebookId": bson.ObjectIdHex(notebookId), + "UserId": bson.ObjectIdHex(userId), + "IsDeleted": false, + }) == 0 { // 无 if db.Count(db.Notes, bson.M{"NotebookId": bson.ObjectIdHex(notebookId), "UserId": bson.ObjectIdHex(userId), - "IsTrash": false}) == 0 { // 不包含trash + "IsTrash": false, + "IsDeleted": false}) == 0 { // 不包含trash // 不是真删除 1/20, 为了同步笔记本 ok := db.UpdateByQMap(db.Notebooks, bson.M{"_id": bson.ObjectIdHex(notebookId)}, bson.M{"IsDeleted": true, "Usn": userService.IncrUsn(userId)}) return ok, "" diff --git a/src/github.com/leanote/leanote/bin/release.sh b/src/github.com/leanote/leanote/bin/release.sh index d27c348..b75219e 100644 --- a/src/github.com/leanote/leanote/bin/release.sh +++ b/src/github.com/leanote/leanote/bin/release.sh @@ -9,7 +9,7 @@ SP=$(cd "$(dirname "$0")"; pwd) tmp="/Users/life/Desktop/leanote_release" # version -V="v1.0" +V="v1.0.1" ##================================= # 1. 先build 成 3个平台, 2种bit = 6种