mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
Code optimization
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/hex"
|
||||
"github.com/cnlh/nps/lib/crypt"
|
||||
"github.com/cnlh/nps/vender/github.com/astaxie/beego"
|
||||
"time"
|
||||
)
|
||||
|
||||
type AuthController struct {
|
||||
@@ -31,3 +32,10 @@ func (s *AuthController) GetAuthKey() {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func (s *AuthController) GetTime() {
|
||||
m := make(map[string]interface{})
|
||||
m["time"] = time.Now().Unix()
|
||||
s.Data["json"] = m
|
||||
s.ServeJSON()
|
||||
}
|
||||
|
Reference in New Issue
Block a user