chore: Remove displayName field from credentials

This commit is contained in:
Faruk AYDIN
2021-10-14 16:56:51 +02:00
committed by Ali BARIN
parent 5be9ff8383
commit 1fbc58e7e1
5 changed files with 14 additions and 23 deletions

View File

@@ -6,12 +6,10 @@ import RequestWithCurrentUser from '../../types/express/request-with-current-use
type Params = {
key: string,
displayName: string,
data: object
}
const createCredentialResolver = async (params: Params, req: RequestWithCurrentUser) => {
const credential = await Credential.query().insert({
displayName: params.displayName,
key: params.key,
data: params.data,
userId: req.currentUser.id
@@ -24,7 +22,6 @@ const createCredential = {
type: credentialType,
args: {
key: { type: GraphQLNonNull(GraphQLString) },
displayName: { type: GraphQLNonNull(GraphQLString) },
data: { type: GraphQLNonNull(twitterCredentialInputType) }
},
resolve: (_: any, params: Params, req: RequestWithCurrentUser) => createCredentialResolver(params, req)

View File

@@ -6,7 +6,6 @@ const credentialType = new GraphQLObjectType({
fields: {
id: { type: GraphQLString },
key: { type: GraphQLString },
displayName: { type: GraphQLString },
data: { type: twitterCredentialType },
}
})