Improve performance of asynchronous like/update

- Make the like module return earlier instead of outputting a full empty HTML page
- Update the force_update variable earlier to prevent spilling on multiple unrelated nav update calls
This commit is contained in:
Hypolite Petovan 2020-05-27 08:30:26 -04:00
parent 9ebb2c6527
commit 2d217129b9
2 changed files with 10 additions and 6 deletions

View file

@ -22,6 +22,7 @@
namespace Friendica\Module;
use Friendica\BaseModule;
use Friendica\Core\System;
use Friendica\DI;
use Friendica\Model\Item;
use Friendica\Core\Session;
@ -68,5 +69,7 @@ class Like extends BaseModule
DI::baseUrl()->redirect($returnPath . $rand);
}
System::jsonExit(['status' => 'OK']);
}
}