added roundstats with eco info, switched to avatar hash
This commit is contained in:
@@ -34,6 +34,19 @@ func (f PlayerFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, erro
|
||||
return f(ctx, mv)
|
||||
}
|
||||
|
||||
// The RoundStatsFunc type is an adapter to allow the use of ordinary
|
||||
// function as RoundStats mutator.
|
||||
type RoundStatsFunc func(context.Context, *ent.RoundStatsMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f RoundStatsFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
mv, ok := m.(*ent.RoundStatsMutation)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.RoundStatsMutation", m)
|
||||
}
|
||||
return f(ctx, mv)
|
||||
}
|
||||
|
||||
// The StatsFunc type is an adapter to allow the use of ordinary
|
||||
// function as Stats mutator.
|
||||
type StatsFunc func(context.Context, *ent.StatsMutation) (ent.Value, error)
|
||||
|
Reference in New Issue
Block a user