clean up svelte ui big time, and add beginnings of item stuff.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
+2
-12
@@ -13,11 +13,11 @@ type ScoringService struct {
|
||||
db database.Database
|
||||
}
|
||||
|
||||
func (s *ScoringService) ScoreOne(ctx context.Context, period models.Period, log models.PeriodLog) (*models.Score, error) {
|
||||
func (s *ScoringService) ScoreOne(ctx context.Context, period models.Period, log models.Log) (*models.Score, error) {
|
||||
return s.scoreOne(ctx, period, log)
|
||||
}
|
||||
|
||||
func (s *ScoringService) scoreOne(ctx context.Context, period models.Period, log models.PeriodLog) (*models.Score, error) {
|
||||
func (s *ScoringService) scoreOne(ctx context.Context, period models.Period, log models.Log) (*models.Score, error) {
|
||||
goal := period.Goal(log.GoalID)
|
||||
if goal == nil {
|
||||
return nil, slerrors.NotFound("Goal")
|
||||
@@ -37,16 +37,6 @@ func (s *ScoringService) scoreOne(ctx context.Context, period models.Period, log
|
||||
Amount: log.Amount,
|
||||
}
|
||||
|
||||
if log.SubGoalID != "" {
|
||||
subGoal := goal.SubGoal(log.SubGoalID)
|
||||
if subGoal == nil {
|
||||
return nil, slerrors.NotFound("Sub-Goal")
|
||||
}
|
||||
|
||||
multiplier := subGoal.Multiplier
|
||||
score.SubGoalMultiplier = &multiplier
|
||||
}
|
||||
|
||||
if activity.DailyBonus > 0 {
|
||||
isFirst := true
|
||||
for _, log2 := range period.Logs {
|
||||
|
||||
Reference in New Issue
Block a user