Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 9769120

Browse files
committed
修改一些细节
1 parent 54793a4 commit 9769120

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

teaconfigs/notices/notice.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func NewNotice() *Notice {
5353

5454
// 设置时间
5555
func (this *Notice) SetTime(t time.Time) {
56-
this.Timestamp = time.Now().Unix()
56+
this.Timestamp = t.Unix()
5757
}
5858

5959
// 计算Hash
@@ -139,4 +139,4 @@ func (this *Notice) DBColumns() maps.Map {
139139
"agentItemId": this.Agent.ItemId,
140140
"agentThreshold": this.Agent.Threshold,
141141
}
142-
}
142+
}

teaweb/actions/default/login/index.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (this *IndexAction) RunGet() {
2525
// 检查IP限制
2626
if !configs.SharedAdminConfig().AllowIP(this.RequestRemoteIP()) {
2727
this.ResponseWriter.WriteHeader(http.StatusForbidden)
28-
this.WriteString("TeaWeb Access Forbidden")
28+
this.WriteString(teaconst.TeaProductName + " Access Forbidden")
2929
return
3030
}
3131

@@ -54,7 +54,7 @@ func (this *IndexAction) RunPost(params struct {
5454
// 检查IP限制
5555
if !configs.SharedAdminConfig().AllowIP(this.RequestRemoteIP()) {
5656
this.ResponseWriter.WriteHeader(http.StatusForbidden)
57-
this.WriteString("TeaWeb Access Forbidden")
57+
this.WriteString(teaconst.TeaProductName + " Access Forbidden")
5858
return
5959
}
6060

teaweb/helpers/user_must_auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func (this *UserMustAuth) BeforeAction(actionPtr actions.ActionWrapper, paramNam
2020
// 检查IP
2121
if !configs.SharedAdminConfig().AllowIP(action.RequestRemoteIP()) {
2222
action.ResponseWriter.WriteHeader(http.StatusForbidden)
23-
action.WriteString("TeaWeb Access Forbidden")
23+
action.WriteString(teaconst.TeaProductName + " Access Forbidden")
2424
return false
2525
}
2626

0 commit comments

Comments
 (0)