refactor: Rename AppAuthClient model as OAuthClient
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
const createAppAuthClientMock = (appAuthClient) => {
|
||||
return {
|
||||
data: {
|
||||
name: appAuthClient.name,
|
||||
active: appAuthClient.active,
|
||||
},
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'AppAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default createAppAuthClientMock;
|
||||
@@ -0,0 +1,17 @@
|
||||
const createOAuthClientMock = (oauthClient) => {
|
||||
return {
|
||||
data: {
|
||||
name: oauthClient.name,
|
||||
active: oauthClient.active,
|
||||
},
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'OAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default createOAuthClientMock;
|
||||
@@ -1,18 +0,0 @@
|
||||
const getAppAuthClientMock = (appAuthClient) => {
|
||||
return {
|
||||
data: {
|
||||
name: appAuthClient.name,
|
||||
id: appAuthClient.id,
|
||||
active: appAuthClient.active,
|
||||
},
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'AppAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default getAppAuthClientMock;
|
||||
@@ -1,18 +0,0 @@
|
||||
const getAdminAppAuthClientsMock = (appAuthClients) => {
|
||||
return {
|
||||
data: appAuthClients.map((appAuthClient) => ({
|
||||
name: appAuthClient.name,
|
||||
id: appAuthClient.id,
|
||||
active: appAuthClient.active,
|
||||
})),
|
||||
meta: {
|
||||
count: appAuthClients.length,
|
||||
currentPage: null,
|
||||
isArray: true,
|
||||
totalPages: null,
|
||||
type: 'AppAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default getAdminAppAuthClientsMock;
|
||||
@@ -0,0 +1,18 @@
|
||||
const getOAuthClientMock = (oauthClient) => {
|
||||
return {
|
||||
data: {
|
||||
name: oauthClient.name,
|
||||
id: oauthClient.id,
|
||||
active: oauthClient.active,
|
||||
},
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'OAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default getOAuthClientMock;
|
||||
@@ -0,0 +1,18 @@
|
||||
const getAdminOAuthClientsMock = (oauthClients) => {
|
||||
return {
|
||||
data: oauthClients.map((oauthClient) => ({
|
||||
name: oauthClient.name,
|
||||
id: oauthClient.id,
|
||||
active: oauthClient.active,
|
||||
})),
|
||||
meta: {
|
||||
count: oauthClients.length,
|
||||
currentPage: null,
|
||||
isArray: true,
|
||||
totalPages: null,
|
||||
type: 'OAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default getAdminOAuthClientsMock;
|
||||
@@ -1,18 +0,0 @@
|
||||
const updateAppAuthClientMock = (appAuthClient) => {
|
||||
return {
|
||||
data: {
|
||||
id: appAuthClient.id,
|
||||
name: appAuthClient.name,
|
||||
active: appAuthClient.active,
|
||||
},
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'AppAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default updateAppAuthClientMock;
|
||||
@@ -0,0 +1,18 @@
|
||||
const updateOAuthClientMock = (oauthClient) => {
|
||||
return {
|
||||
data: {
|
||||
id: oauthClient.id,
|
||||
name: oauthClient.name,
|
||||
active: oauthClient.active,
|
||||
},
|
||||
meta: {
|
||||
count: 1,
|
||||
currentPage: null,
|
||||
isArray: false,
|
||||
totalPages: null,
|
||||
type: 'OAuthClient',
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default updateOAuthClientMock;
|
||||
Reference in New Issue
Block a user