forked from golang/hotime
增加上传接口
This commit is contained in:
parent
05c8159601
commit
4ad401bafc
@ -412,6 +412,9 @@ func (that *Application) crossDomain(context *Context) {
|
|||||||
|
|
||||||
if context.Config.GetString("crossDomain") != "auto" {
|
if context.Config.GetString("crossDomain") != "auto" {
|
||||||
header.Set("Access-Control-Allow-Origin", that.Config.GetString("crossDomain"))
|
header.Set("Access-Control-Allow-Origin", that.Config.GetString("crossDomain"))
|
||||||
|
// 后端设置,2592000单位秒,这里是30天
|
||||||
|
header.Set("Access-Control-Max-Age", "2592000")
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ var ColumnNameType = []ColumnShow{
|
|||||||
|
|
||||||
{"index", false, false, false, false, "", false},
|
{"index", false, false, false, false, "", false},
|
||||||
{"password", false, true, false, false, "password", false},
|
{"password", false, true, false, false, "password", false},
|
||||||
|
{"pwd", false, true, false, false, "password", false},
|
||||||
{"info", false, true, true, false, "", false},
|
{"info", false, true, true, false, "", false},
|
||||||
{"version", false, false, false, false, "", false},
|
{"version", false, false, false, false, "", false},
|
||||||
{"seq", false, true, true, false, "", false},
|
{"seq", false, true, true, false, "", false},
|
||||||
|
@ -1013,8 +1013,9 @@ func (that *HoTimeDB) Insert(table string, data map[string]interface{}) int64 {
|
|||||||
|
|
||||||
id := int64(0)
|
id := int64(0)
|
||||||
if err.GetError() == nil && res != nil {
|
if err.GetError() == nil && res != nil {
|
||||||
//id, that.LastErr.err = res.LastInsertId()
|
id1, err := res.LastInsertId()
|
||||||
|
that.LastErr.SetError(err)
|
||||||
|
id = id1
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果插入成功,删除缓存
|
//如果插入成功,删除缓存
|
||||||
|
Loading…
Reference in New Issue
Block a user