mirror of
https://github.com/bitwarden/server.git
synced 2025-04-10 15:48:13 -05:00
17 lines
496 B
C#
17 lines
496 B
C#
using Microsoft.AspNetCore.Mvc.ApplicationModels;
|
|
|
|
namespace Bit.Api.Utilities
|
|
{
|
|
public class PublicApiControllersModelConvention : IControllerModelConvention
|
|
{
|
|
public void Apply(ControllerModel controller)
|
|
{
|
|
var controllerNamespace = controller.ControllerType.Namespace;
|
|
if(controllerNamespace.Contains(".Public."))
|
|
{
|
|
controller.Filters.Add(new CamelCaseJsonResultFilterAttribute());
|
|
}
|
|
}
|
|
}
|
|
}
|