add following

This commit is contained in:
biglyderv 2024-09-22 19:11:15 -04:00
parent ba522e044a
commit 20dbce62cb
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954
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;