かわいいおにゃのこの愛液飲みたい
This account is not set to public on notestock.
This account is not set to public on notestock.
dbのおすすめのアプリケーション
多分もっと楽な実装方法あるんだろうなあ
const express = require('express');
const router = express.Router();
const request = require('request');
const bodyParser = require("body-parser");
router.use(bodyParser.json());
router.use(bodyParser.urlencoded({ extended: true }));
router.get('/', (req, res) => {
if (req.query!="undefined"){
res.send(req.query);
}else{
const instance = req.params.instance;
send_data= {name:`egoskey`,description:`test`,permission:[`read:account,read:blocks`],callbackUrl:`http://localhost:8080/login/`};
var url = `https://${instance}/api/app/create`;
request.post({
uri:url,
headers: {
"Content-type": "application/json",
},
json:send_data,
}, function(err, req, data){
console.log(data);
});
res.render('login/index');
}
});
router.post('/', (req, res) => {
const instance = req.body.instance;
send_data= {name:`egoskey`,description:`test`,permission:[`read:account,read:blocks`],callbackUrl:`https://localhost:8080/login/`};
var url = `https://${instance}/api/app/create`;
request.post({
uri:url,
headers: {
"Content-type": "application/json",
},
json:send_data,
}, function(err, req, data){
send_data= {appSecret:`${data.secret}`};
var url = `https://${instance}/api/auth/session/generate`;
// console.log(data);
request.post({
uri:url,
headers: {
"Content-type": "application/json",
},
json:send_data,
}, function(err, req, data){
res.redirect(data.url);
});
});
});
module.exports = router;
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.
This account is not set to public on notestock.