mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
19 lines
293 B
Go
19 lines
293 B
Go
package challenge
|
|
|
|
import (
|
|
"crawlab/model"
|
|
"github.com/globalsign/mgo/bson"
|
|
)
|
|
|
|
type Login7dService struct {
|
|
UserId bson.ObjectId
|
|
}
|
|
|
|
func (s *Login7dService) Check() (bool, error) {
|
|
days, err := model.GetVisitDays(s.UserId)
|
|
if err != nil {
|
|
return false, err
|
|
}
|
|
return days >= 7, nil
|
|
}
|