getFactor reads the factor id from the context
(ctx context.Context)
| 94 | |
| 95 | // getFactor reads the factor id from the context |
| 96 | func getFactor(ctx context.Context) *models.Factor { |
| 97 | obj := ctx.Value(factorKey) |
| 98 | if obj == nil { |
| 99 | return nil |
| 100 | } |
| 101 | return obj.(*models.Factor) |
| 102 | } |
| 103 | |
| 104 | // withSession adds the session to the context. |
| 105 | func withSession(ctx context.Context, s *models.Session) context.Context { |
no test coverage detected