Refine all the panic method.

This commit is contained in:
zicla
2019-04-26 02:50:32 +08:00
parent 8edc30babc
commit 46256439da
13 changed files with 98 additions and 100 deletions

View File

@ -4,6 +4,7 @@ import (
"net/http"
"tank/rest/cache"
"tank/rest/config"
"tank/rest/result"
"time"
)
@ -49,7 +50,7 @@ func (this *UserService) MatterLock(userUuid string) {
//当前被锁住了。
if cacheItem != nil && cacheItem.Data() != nil {
this.PanicBadRequest("当前正在进行文件操作,请稍后再试!")
panic(result.BadRequest("当前正在进行文件操作,请稍后再试!"))
}
//添加一把新锁有效期为12小时