Skip to content

Commit

Permalink
fixed assignment mail sending
Browse files Browse the repository at this point in the history
  • Loading branch information
dheidemann committed Dec 9, 2024
1 parent 11a5bc8 commit 7e18203
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
otel-collector:
image: otel/opentelemetry-collector-contrib
volumes:
- ./otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml:ro
- ./otel-collector-config.yml:/etc/otelcol-contrib/config.yaml:ro

server:
build:
Expand Down
2 changes: 1 addition & 1 deletion frontend/components/event-dialog/event-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export default function EventDialog() {
<div className="flex flex-row space-x-2">
<Checkbox checked={event?.needsTutors} />
<label className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
Benötigt noch Tutor/innen
Benötigt noch Tutoren
</label>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion otel-collector-config.yaml → otel-collector-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ service:
traces:
receivers: [otlp]
processors: []
exporters: [otlphttp]
exporters: [debug]
4 changes: 4 additions & 0 deletions server/graph/schema.resolvers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/FachschaftMathPhysInfo/pepp/server/models"
"github.com/FachschaftMathPhysInfo/pepp/server/password"
hermes "github.com/matcornic/hermes/v2"
"github.com/sirupsen/logrus"
"github.com/uptrace/bun"
)

Expand Down Expand Up @@ -503,6 +504,7 @@ func (r *mutationResolver) AddEventAssignmentForTutor(ctx context.Context, assig
Relation("Event").
Relation("Room").
Relation("Building").
Relation("User").
WherePK().
Scan(ctx); err != nil {
return nil, err
Expand All @@ -512,6 +514,8 @@ func (r *mutationResolver) AddEventAssignmentForTutor(ctx context.Context, assig

m.Subject = fmt.Sprintf("%s: %s",
r.Settings["email-assignment-subject"], assignment.Event.Title)
logrus.Info("title", assignment.Event.Title)
logrus.Info("room number: ", assignment.Room.Number)

roomNumber := assignment.Room.Number
if assignment.Room.Name != "" {
Expand Down

0 comments on commit 7e18203

Please sign in to comment.