adding debug lines

This commit is contained in:
counter 2023-01-15 23:08:21 -08:00
parent 31f3a87d04
commit 02ba2dd002
2 changed files with 4 additions and 7 deletions

5
api.js
View file

@ -227,10 +227,7 @@ async function set_up_api_server(app) {
Update the user's path.
*/
app.put(constants.API_BASE_PATH + 'user-path', async (req, res) => {
console.log(req.body);
console.log(req.body.user_path);
console.log(req.body.user_path instanceof String);
if(req.body.user_path instanceof String){
if(typeof req.body.user_path 'string'){
const desiredPath = req.body.user_path;
const collisionUser = await Users.findOne({ where: { 'path': desiredPath } });
}else{

View file

@ -203,15 +203,15 @@ export default {
'rate_limit',
'send_alert_emails'
];
const user_path = await api_request.get_user_path();
this.user_path = user_path;
// Pull settings
const settings_result = await api_request.get_settings();
const settings = settings_result.result;
settings_keys.map(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() {
await api_request.set_chainload_uri(this.chainload_uri);