mirror of
https://github.com/trufflesecurity/xsshunter
synced 2024-11-10 14:54:12 +00:00
adding debug lines
This commit is contained in:
parent
31f3a87d04
commit
02ba2dd002
2 changed files with 4 additions and 7 deletions
5
api.js
5
api.js
|
@ -227,10 +227,7 @@ async function set_up_api_server(app) {
|
||||||
Update the user's path.
|
Update the user's path.
|
||||||
*/
|
*/
|
||||||
app.put(constants.API_BASE_PATH + 'user-path', async (req, res) => {
|
app.put(constants.API_BASE_PATH + 'user-path', async (req, res) => {
|
||||||
console.log(req.body);
|
if(typeof req.body.user_path 'string'){
|
||||||
console.log(req.body.user_path);
|
|
||||||
console.log(req.body.user_path instanceof String);
|
|
||||||
if(req.body.user_path instanceof String){
|
|
||||||
const desiredPath = req.body.user_path;
|
const desiredPath = req.body.user_path;
|
||||||
const collisionUser = await Users.findOne({ where: { 'path': desiredPath } });
|
const collisionUser = await Users.findOne({ where: { 'path': desiredPath } });
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -203,15 +203,15 @@ export default {
|
||||||
'rate_limit',
|
'rate_limit',
|
||||||
'send_alert_emails'
|
'send_alert_emails'
|
||||||
];
|
];
|
||||||
|
const user_path = await api_request.get_user_path();
|
||||||
|
this.user_path = user_path;
|
||||||
// Pull settings
|
// Pull settings
|
||||||
const settings_result = await api_request.get_settings();
|
const settings_result = await api_request.get_settings();
|
||||||
const settings = settings_result.result;
|
const settings = settings_result.result;
|
||||||
settings_keys.map(settings_key => {
|
settings_keys.map(settings_key => {
|
||||||
this[settings_key] = settings[settings_key];
|
this[settings_key] = settings[settings_key];
|
||||||
});
|
});
|
||||||
const user_path = await api_request.get_user_path();
|
|
||||||
this[user_path] = user_path;
|
|
||||||
},
|
},
|
||||||
update_chainload_uri: async function() {
|
update_chainload_uri: async function() {
|
||||||
await api_request.set_chainload_uri(this.chainload_uri);
|
await api_request.set_chainload_uri(this.chainload_uri);
|
||||||
|
|
Loading…
Reference in a new issue