mirror of
https://github.com/FranP-code/Open-Telegram-to-Notion-Backend.git
synced 2025-10-12 23:52:54 +00:00
fixes
This commit is contained in:
@@ -3,6 +3,10 @@ const app = Express()
|
||||
const port = (process.env.PORT || 3030)
|
||||
require('dotenv').config()
|
||||
|
||||
//Enable CORS
|
||||
const cors = require('cors');
|
||||
app.use(cors())
|
||||
|
||||
//Configure Handlebars
|
||||
const hbs = require('hbs')
|
||||
hbs.registerPartials(__dirname + '/../views/partials')
|
||||
|
||||
@@ -8,7 +8,7 @@ router.get('/', async (req, res) => {
|
||||
async function requestAccessToken() {
|
||||
try {
|
||||
const reqData = {
|
||||
code: req.query.code,
|
||||
code: req.headers.code,
|
||||
grant_type: "authorization_code",
|
||||
redirect_uri: "https://telegram-to-notion.herokuapp.com/auth"
|
||||
}
|
||||
@@ -45,7 +45,6 @@ router.get('/', async (req, res) => {
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error)
|
||||
|
||||
return {status: 400}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user