mirror of
https://github.com/FranP-code/Open-Telegram-to-Notion-Backend.git
synced 2025-10-12 23:52:54 +00:00
Changed the way that Notion code is sended to this API
This commit is contained in:
@@ -23,6 +23,9 @@ app.use(function (req, res, next) {
|
|||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Enable body json
|
||||||
|
app.use(Express.json())
|
||||||
|
|
||||||
//Configure Handlebars
|
//Configure Handlebars
|
||||||
const hbs = require('hbs')
|
const hbs = require('hbs')
|
||||||
hbs.registerPartials(__dirname + '/../views/partials')
|
hbs.registerPartials(__dirname + '/../views/partials')
|
||||||
|
|||||||
@@ -5,10 +5,12 @@ const axios = require('axios')
|
|||||||
|
|
||||||
router.post('/', async (req, res) => {
|
router.post('/', async (req, res) => {
|
||||||
|
|
||||||
|
console.log(req.body)
|
||||||
|
|
||||||
async function requestAccessToken() {
|
async function requestAccessToken() {
|
||||||
try {
|
try {
|
||||||
const reqData = {
|
const reqData = {
|
||||||
code: req.headers.code,
|
code: req.body.code,
|
||||||
grant_type: "authorization_code",
|
grant_type: "authorization_code",
|
||||||
redirect_uri: "https://telegram-to-notion.herokuapp.com/auth"
|
redirect_uri: "https://telegram-to-notion.herokuapp.com/auth"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user