add following
This commit is contained in:
parent
7bec5f61f0
commit
06ef3ce8e0
3 changed files with 20 additions and 14 deletions
|
@ -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;
|
Loading…
Add table
Add a link
Reference in a new issue