mirror of
https://github.com/trufflesecurity/xsshunter
synced 2025-02-17 13:58:26 +00:00
fixing put to get
This commit is contained in:
parent
14be6375be
commit
c3d17a9f2d
2 changed files with 4 additions and 4 deletions
6
api.js
6
api.js
|
@ -218,7 +218,7 @@ async function set_up_api_server(app) {
|
|||
res.status(200).json({
|
||||
"success": true,
|
||||
"result": {
|
||||
"uri": user.path
|
||||
"path": user.path
|
||||
}
|
||||
}).end();
|
||||
});
|
||||
|
@ -228,7 +228,7 @@ async function set_up_api_server(app) {
|
|||
*/
|
||||
app.put(constants.API_BASE_PATH + 'user-path', async (req, res) => {
|
||||
if(req.body.path instanceof String){
|
||||
const desiredPath = req.body.path;
|
||||
const desiredPath = req.body.user_path;
|
||||
const collisionUser = await Users.findOne({ where: { 'path': desiredPath } });
|
||||
}else{
|
||||
return res.status(200).json({
|
||||
|
@ -249,7 +249,7 @@ async function set_up_api_server(app) {
|
|||
res.status(200).json({
|
||||
"success": true,
|
||||
"result": {
|
||||
"uri": user.path
|
||||
"path": user.path
|
||||
}
|
||||
}).end();
|
||||
});
|
||||
|
|
|
@ -183,7 +183,7 @@ export default {
|
|||
}
|
||||
const res = await api_request.update_user_path(desiredPath);
|
||||
const user_path = await api_request.get_user_path();
|
||||
this.user_path = user_path;
|
||||
this.user_path = user_path.result.path;
|
||||
if(res.success){
|
||||
toastr.success('Your user path has been updated.', 'Path Updated');
|
||||
}else{
|
||||
|
|
Loading…
Add table
Reference in a new issue