Skip to content

Commit 0eef1d8

Browse files
authored
Merge pull request #42 from satisfactorymodding/staging
fix: no mod views?
2 parents c1eba24 + ca55300 commit 0eef1d8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

db/postgres/mod.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ func GetModCountNew(ctx context.Context, filter *models.ModFilter, unapproved bo
120120
}
121121

122122
func IncrementModViews(ctx context.Context, mod *Mod) {
123-
DBCtx(ctx).Model(mod).Update("views", mod.Views+1)
123+
// TODO unignore
124+
//DBCtx(ctx).Model(mod).Update("views", mod.Views+1)
124125
}
125126

126127
func GetMods(ctx context.Context, limit int, offset int, orderBy string, order string, search string, unapproved bool) []Mod {

gql/gql_utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ func WrapMutationTrace(ctx context.Context, action string) (TraceWrapper, contex
2727
}
2828

2929
func wrapTrace(ctx context.Context, action string, actionType string) (TraceWrapper, context.Context) {
30-
//spanCtx, span := otel.Tracer("gql").Start(ctx, "GraphQL "+action, trace.WithAttributes(
30+
// spanCtx, span := otel.Tracer("gql").Start(ctx, "GraphQL "+action, trace.WithAttributes(
3131
// attribute.String("action_type", "API.graphql."+actionType),
3232
//))
3333

3434
return TraceWrapper{
35-
//Span: span,
35+
// Span: span,
3636
}, ctx
3737
}
3838

3939
func (wrapper TraceWrapper) end() {
40-
//defer wrapper.Span.End()
40+
// defer wrapper.Span.End()
4141
//
4242
//if err := recover(); err != nil {
4343
// wrapper.Span.RecordError(fmt.Errorf("panic: %v", err))

0 commit comments

Comments
 (0)