
- auth clients are always shared, cannot be disabled - custom connections are enabled by default, can be disabled - any existing connections can be reconnected regardless of its AppConfig or AppAuthClient states
21 lines
548 B
JavaScript
21 lines
548 B
JavaScript
import { renderObject } from '../../../../../helpers/renderer.js';
|
|
import AppConfig from '../../../../../models/app-config.js';
|
|
|
|
export default async (request, response) => {
|
|
const createdAppConfig = await AppConfig.query().insertAndFetch(
|
|
appConfigParams(request)
|
|
);
|
|
|
|
renderObject(response, createdAppConfig, { status: 201 });
|
|
};
|
|
|
|
const appConfigParams = (request) => {
|
|
const { useOnlyPredefinedAuthClients, disabled } = request.body;
|
|
|
|
return {
|
|
key: request.params.appKey,
|
|
useOnlyPredefinedAuthClients,
|
|
disabled,
|
|
};
|
|
};
|