Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller name customization #176

Merged
merged 2 commits into from
Mar 16, 2024

Conversation

IPdotSetAF
Copy link
Contributor

Added ImageController name customization.

there is also a problem with the last update (RouteTemplate):

I can also implement that in this PR if Its fine with you.

Added Controller name customization feature
Copy link

what-the-diff bot commented Mar 16, 2024

PR Summary

  • Added Dynamic Control of Image Controller's Name Template
    A new method, WithCaptchaImageControllerNameTemplate, has been incorporated into the DNTCaptchaOptions class. This enhancement enables the image controller's name template to be adjusted on the fly during program operation.

  • Renamed Class Responsible for Routing
    The former DynamicRoutingControllerModelConvention class has been renamed to ControllerRoutingConvention. This change brings more clarity to the class's function in the DNTCaptcha.Core namespace, which relates to routing controllers.

  • Updated Extension Method with New Class
    The CaptchaServiceCollectionExtensions.cs file was updated to utilize the renamed ControllerRoutingConvention class in its AddDNTCaptcha method, further integrating the new class name into the code.

  • Additional Features for Dynamic Name Template Changes
    The ControllerRoutingConvention.cs file was amended to include a new method, ApplyNewNameDynamically. This allows for dynamic changes to the name template in the controller model, providing more flexibility in how controllers are named during runtime.

  • Implementation of New Name Template Approach
    Also in the ControllerRoutingConvention.cs file, the new name template has been applied in the ApplyNewNameDynamically method, sealing its functionality in the overall system.

@IPdotSetAF
Copy link
Contributor Author

I Found out that there is also another error in the DNTCaptchaApiProvider that i will fix shortly (actionUrl is null).

@VahidN VahidN merged commit bba980e into VahidN:master Mar 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants