chore: Rename createAuthLink as createAuthData

This commit is contained in:
Faruk AYDIN
2021-10-26 21:52:04 +02:00
committed by Ali BARIN
parent 901699fe64
commit cbfba465db
15 changed files with 43 additions and 43 deletions

View File

@@ -6,7 +6,7 @@ import RequestWithCurrentUser from '../../types/express/request-with-current-use
type Params = {
id: number,
}
const createAuthLinkResolver = async (params: Params, req: RequestWithCurrentUser) => {
const createAuthDataResolver = async (params: Params, req: RequestWithCurrentUser) => {
const connection = await Connection.query().findOne({
user_id: req.currentUser.id,
id: params.id
@@ -19,7 +19,7 @@ const createAuthLinkResolver = async (params: Params, req: RequestWithCurrentUse
consumerSecret: connection.data.consumerSecret
});
const authLink = await appInstance.createAuthLink();
const authLink = await appInstance.createAuthData();
await connection.$query().patch({
data: {
@@ -31,12 +31,12 @@ const createAuthLinkResolver = async (params: Params, req: RequestWithCurrentUse
return authLink;
}
const createAuthLink = {
const createAuthData = {
type: authLinkType,
args: {
id: { type: GraphQLNonNull(GraphQLString) },
},
resolve: (_: any, params: Params, req: RequestWithCurrentUser) => createAuthLinkResolver(params, req)
resolve: (_: any, params: Params, req: RequestWithCurrentUser) => createAuthDataResolver(params, req)
};
export default createAuthLink;
export default createAuthData;