mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-25 17:42:25 +01:00
加入挑战
This commit is contained in:
@@ -32,7 +32,7 @@ func (ch *Challenge) Save() error {
|
||||
|
||||
ch.UpdateTs = time.Now()
|
||||
|
||||
if err := c.UpdateId(ch.Id, c); err != nil {
|
||||
if err := c.UpdateId(ch.Id, ch); err != nil {
|
||||
debug.PrintStack()
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ type Task struct {
|
||||
TotalDuration float64 `json:"total_duration" bson:"total_duration"`
|
||||
Pid int `json:"pid" bson:"pid"`
|
||||
RunType string `json:"run_type" bson:"run_type"`
|
||||
ScheduleId bson.ObjectId `json:"schedule_id" bson:"schedule_id"`
|
||||
//ScheduleId bson.ObjectId `json:"schedule_id" bson:"schedule_id"`
|
||||
|
||||
// 前端数据
|
||||
SpiderName string `json:"spider_name"`
|
||||
|
||||
@@ -19,8 +19,9 @@ type User struct {
|
||||
Email string `json:"email" bson:"email"`
|
||||
Setting UserSetting `json:"setting" bson:"setting"`
|
||||
|
||||
CreateTs time.Time `json:"create_ts" bson:"create_ts"`
|
||||
UpdateTs time.Time `json:"update_ts" bson:"update_ts"`
|
||||
UserId bson.ObjectId `json:"user_id" bson:"user_id"`
|
||||
CreateTs time.Time `json:"create_ts" bson:"create_ts"`
|
||||
UpdateTs time.Time `json:"update_ts" bson:"update_ts"`
|
||||
}
|
||||
|
||||
type UserSetting struct {
|
||||
|
||||
Reference in New Issue
Block a user