refactor(app-config): rename allow_custom_connection as custom_connection_allowed

This commit is contained in:
Ali BARIN
2024-10-09 10:10:40 +00:00
committed by Faruk AYDIN
parent a76bee51fc
commit 0bbe362660
15 changed files with 42 additions and 58 deletions

View File

@@ -10,11 +10,11 @@ export default async (request, response) => {
};
const appConfigParams = (request) => {
const { allowCustomConnection, shared, disabled } = request.body;
const { customConnectionAllowed, shared, disabled } = request.body;
return {
key: request.params.appKey,
allowCustomConnection,
customConnectionAllowed,
shared,
disabled,
};

View File

@@ -23,7 +23,7 @@ describe('POST /api/v1/admin/apps/:appKey/config', () => {
it('should return created app config', async () => {
const appConfig = {
allowCustomConnection: true,
customConnectionAllowed: true,
shared: true,
disabled: false,
};
@@ -44,7 +44,7 @@ describe('POST /api/v1/admin/apps/:appKey/config', () => {
it('should return HTTP 422 for already existing app config', async () => {
const appConfig = {
key: 'gitlab',
allowCustomConnection: true,
customConnectionAllowed: true,
shared: true,
disabled: false,
};

View File

@@ -14,10 +14,10 @@ export default async (request, response) => {
};
const appConfigParams = (request) => {
const { allowCustomConnection, shared, disabled } = request.body;
const { customConnectionAllowed, shared, disabled } = request.body;
return {
allowCustomConnection,
customConnectionAllowed,
shared,
disabled,
};

View File

@@ -24,7 +24,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
it('should return updated app config', async () => {
const appConfig = {
key: 'gitlab',
allowCustomConnection: true,
customConnectionAllowed: true,
shared: true,
disabled: false,
};
@@ -34,7 +34,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
const newAppConfigValues = {
shared: false,
disabled: true,
allowCustomConnection: false,
customConnectionAllowed: false,
};
const response = await request(app)
@@ -55,7 +55,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
const appConfig = {
shared: false,
disabled: true,
allowCustomConnection: false,
customConnectionAllowed: false,
};
await request(app)
@@ -68,7 +68,7 @@ describe('PATCH /api/v1/admin/apps/:appKey/config', () => {
it('should return HTTP 422 for invalid app config data', async () => {
const appConfig = {
key: 'gitlab',
allowCustomConnection: true,
customConnectionAllowed: true,
shared: true,
disabled: false,
};