Skip to content

Commit 749a8e1

Browse files
committed
Server:放宽Document的修改权限,解决APIJSONAuto不能更新测试标准;优化headVerify的代码,方便调试
1 parent 94e7456 commit 749a8e1

File tree

2 files changed

+8
-2
lines changed
  • APIJSON-Java-Server

2 files changed

+8
-2
lines changed

APIJSON-Java-Server/APIJSONDemo/src/main/java/apijson/demo/server/Controller.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,9 @@ public JSONObject headVerify(int type, String phone, String code) {
367367
}
368368

369369
//验证码过期
370-
if (System.currentTimeMillis() > (60*1000 + BaseModel.getTimeMillis(verify.getDate()))) {
370+
long time = BaseModel.getTimeMillis(verify.getDate());
371+
long now = System.currentTimeMillis();
372+
if (now > 60*1000 + time) {
371373
new DemoParser(DELETE, true).parseResponse(
372374
new JSONRequest(new Verify(type, phone)).setTag(VERIFY_)
373375
);

APIJSON-Java-Server/APIJSONLibrary/src/main/java/zuo/biao/apijson/server/model/Document.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
/**测试用例文档
2323
* @author Lemon
2424
*/
25-
@MethodAccess(GET = { LOGIN, ADMIN }, HEAD = { LOGIN, ADMIN })
25+
@MethodAccess(
26+
GET = { LOGIN, ADMIN },
27+
HEAD = { LOGIN, ADMIN },
28+
PUT = { LOGIN, ADMIN }
29+
)
2630
public class Document {
2731
}

0 commit comments

Comments
 (0)