feat: Implement admin get app auth clients API endpoint
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import AppConfig from '../../src/models/app-config.js';
|
||||
import { faker } from '@faker-js/faker';
|
||||
|
||||
export const createAppConfig = async (params = {}) => {
|
||||
params.key = params?.key || 'gitlab';
|
||||
params.key = params?.key || faker.lorem.word();
|
||||
|
||||
const appConfig = await AppConfig.query().insertAndFetch(params);
|
||||
|
||||
|
@@ -0,0 +1,19 @@
|
||||
const getAdminAppAuthClientsMock = (appAuthClients) => {
|
||||
return {
|
||||
data: appAuthClients.map((appAuthClient) => ({
|
||||
appConfigId: appAuthClient.appConfigId,
|
||||
name: appAuthClient.name,
|
||||
id: appAuthClient.id,
|
||||
active: appAuthClient.active,
|
||||
})),
|
||||
meta: {
|
||||
count: appAuthClients.length,
|
||||
currentPage: null,
|
||||
isArray: true,
|
||||
totalPages: null,
|
||||
type: 'AppAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default getAdminAppAuthClientsMock;
|
Reference in New Issue
Block a user