add following

This commit is contained in:
biglyderv 2024-11-25 14:12:43 -05:00
parent 7bec5f61f0
commit 06ef3ce8e0
3 changed files with 20 additions and 14 deletions

View file

@ -26,15 +26,14 @@ let main = new Route([auth], async function (req, res, input) {
username,
target
]);
res.send({'success': true, 'message': 'User unfollowed'});
} else {
await db.run('INSERT INTO follow (username,target) VALUES (?,?)', [
username,
target
]);
res.send({'success': true, 'message': 'User followed'});
}
res.send({ redir: `?` });
});
export default main;