user edit

v1.18.x
Baris Usakli 12 years ago
parent d2f830c75f
commit bf731dc224

@ -10,7 +10,7 @@
<div class="account-username-box">
<span class="account-username">{user.username}</span>
<span class="pull-right"><a href="/users/edit/{user.uid}">edit</a></span>
<span class="pull-right"><a href="/users/{user.username}/edit">edit</a></span>
</div>
<br/>

@ -384,13 +384,13 @@ passport.deserializeUser(function(uid, done) {
res.send('User list');
});
app.get('/users/edit/:uid', function(req, res){
app.get('/users/:uid/edit', function(req, res){
console.log("OPPA");
if(req.user && req.params.uid)
{
//res.send("editing user");
res.send(templates['header'] + '<script>templates.ready(function(){ajaxify.go("users/edit/' + req.params.uid+'");});</script>' + templates['footer']);
res.send(templates['header'] + '<script>templates.ready(function(){ajaxify.go("users/' + req.params.uid+'/edit");});</script>' + templates['footer']);
}
else
return res.redirect('/403');

Loading…
Cancel
Save