Created http api endpoints for managing ignored users list
This commit is contained in:
parent
b80f82b9f2
commit
25a61b5809
4 changed files with 133 additions and 5 deletions
|
|
@ -27,9 +27,11 @@ const validator = require('validator');//No express here, so regular validator i
|
|||
//profile functions
|
||||
module.exports.get = async function(req, res){
|
||||
try{
|
||||
//Get profile name from URL
|
||||
var profileName = req.url.slice(1) == '' ? (req.session.user ? req.session.user.user : null) : req.url.slice(1);
|
||||
|
||||
const profile = await userModel.findProfile({user: profileName}, true);
|
||||
//Pull profile including semi-sensitive information (this object will only be parsed server side)
|
||||
const profile = await userModel.findProfile({user: profileName}, true, true);
|
||||
|
||||
if(profile){
|
||||
//If we have a user, check if the is looking at their own profile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue