refactor: Rename AppAuthClient model as OAuthClient
This commit is contained in:
@@ -2,7 +2,7 @@ const createConnection = (connection) => {
|
||||
const connectionData = {
|
||||
id: connection.id,
|
||||
key: connection.key,
|
||||
appAuthClientId: connection.appAuthClientId,
|
||||
oauthClientId: connection.oauthClientId,
|
||||
formattedData: connection.formattedData,
|
||||
verified: connection.verified || false,
|
||||
createdAt: connection.createdAt.getTime(),
|
||||
|
||||
@@ -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 getAppAuthClientsMock = (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 getAppAuthClientsMock;
|
||||
@@ -4,7 +4,7 @@ const getConnectionsMock = (connections) => {
|
||||
id: connection.id,
|
||||
key: connection.key,
|
||||
verified: connection.verified,
|
||||
appAuthClientId: connection.appAuthClientId,
|
||||
oauthClientId: connection.oauthClientId,
|
||||
formattedData: {
|
||||
screenName: connection.formattedData.screenName,
|
||||
},
|
||||
|
||||
@@ -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 getOAuthClientsMock = (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 getOAuthClientsMock;
|
||||
Reference in New Issue
Block a user