File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ Lin-CMS 是林间有风团队经过大量项目实践所提炼出的一套**内
3333
3434### 当前最新版本
3535
36- lin-cms-koa(当前示例工程):0.3.6
36+ lin-cms-koa(当前示例工程):0.3.7
3737
3838lin-mizar(核心库) :0.3.5
3939
@@ -63,7 +63,11 @@ QQ 群号:643205479 / 814597236
6363
6464## 版本日志
6565
66- 最新版本 ` 0.3.6 `
66+ 最新版本 ` 0.3.7 `
67+
68+ ### 0.3.7
69+
70+ 1 . ` U ` 优化 编辑用户至少选择一个分组
6771
6872### 0.3.6
6973
Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ import { getSafeParamId } from '../../lib/util';
1010import { BookNotFound } from '../../lib/exception' ;
1111import { BookDao } from '../../dao/book' ;
1212
13- console . log ( disableLoading )
14-
1513// book 的红图实例
1614const bookApi = new LinRouter ( {
1715 prefix : '/v1/book' ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class AdminUsersValidator extends PaginateValidator {
1414}
1515
1616class ResetPasswordValidator extends PositiveIdValidator {
17- constructor ( ) {
17+ constructor ( ) {
1818 super ( ) ;
1919 this . new_password = new Rule (
2020 'matches' ,
@@ -40,11 +40,8 @@ class ResetPasswordValidator extends PositiveIdValidator {
4040class UpdateUserInfoValidator extends PositiveIdValidator {
4141 validateGroupIds ( data ) {
4242 const ids = data . body . group_ids ;
43- if ( isOptional ( ids ) ) {
44- return true ;
45- }
46- if ( ! Array . isArray ( ids ) ) {
47- return [ false , '每个id值必须为正整数' ] ;
43+ if ( ! Array . isArray ( ids ) || ids . length < 1 ) {
44+ return [ false , '至少选择一个分组' ] ;
4845 }
4946 for ( let id of ids ) {
5047 if ( typeof id === 'number' ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " lin-cms-koa" ,
3- "version" : " 0.3.6 " ,
3+ "version" : " 0.3.7 " ,
44 "description" : " simple and practical CMS implememted by koa" ,
55 "main" : " app/starter.js" ,
66 "scripts" : {
You can’t perform that action at this time.
0 commit comments