feat: add SetValidatedDTOInContext to support test helper functions

This commit is contained in:
2025-11-23 14:22:59 +01:00
parent 6e4b41894f
commit e2e5d42035

View File

@@ -77,3 +77,7 @@ func GetDTOTypeFromContext(ctx context.Context) reflect.Type {
func GetValidatedDTOFromContext(ctx context.Context) any {
return ctx.Value(validatedDTOKey)
}
func SetValidatedDTOInContext(ctx context.Context, dto any) context.Context {
return context.WithValue(ctx, validatedDTOKey, dto)
}