Streamline TypeCreate lists. This commit removes the highly repetitive definitions for each
of the TypeCreate objects and replaces them with a single generic ReactiveController, which it then instantiates six times, but at least they're shorter!
This commit is contained in:
@ -0,0 +1,12 @@
|
||||
import { DEFAULT_CONFIG } from "@goauthentik/common/api/config";
|
||||
|
||||
import { PropertymappingsApi } from "@goauthentik/api";
|
||||
|
||||
import { createTypesController } from "./GenericTypesController";
|
||||
|
||||
export const PropertyMappingsController = createTypesController(
|
||||
() => new PropertymappingsApi(DEFAULT_CONFIG).propertymappingsAllTypesList(),
|
||||
"/core/property-mappings"
|
||||
);
|
||||
|
||||
export default PropertyMappingsController;
|
||||
Reference in New Issue
Block a user