Last active
December 13, 2018 20:05
-
-
Save Insayt/404e28ee6091af83542eeaaa734c7e23 to your computer and use it in GitHub Desktop.
test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { request } = require('graphql-request'); | |
const sendDataToLkMedia = (user, account, order) => { | |
// сообщаем lk.tooligram.com об оплате | |
const postData = `mutation { | |
createClient( | |
tooliUserId: "${order.user_id}", | |
tooliAccountId: "${order.account_id}", | |
instagramLogin: "${order.insta_login}", | |
instagramAvatar: "${account.avatar_url || ''}", | |
payDate: "${new Date(order.dt_to).getTime()}", | |
payRebilling: true, | |
tgone: ${parseInt(order.type) === 32}, | |
token: "XSh6V6DEt4GUi5QTTkan57thSJs32t" | |
) { | |
id | |
} | |
}`; | |
request('http://localhost:3000/graphql', postData).then(data => | |
console.log(data) | |
) | |
}; | |
sendDataToLkMedia({}, {}, { | |
user_id: "kBqChcQ2E4VfGgPa1x5MjqrYWZ53", | |
account_id: '1', | |
insta_login: 'test', | |
dt_to: Date.now(), | |
type: 5 | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment