mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-12 03:06:43 +02:00
refactor(modules): extract castopod parts into a modules/ folder for a scalable HMVC structure
- create Admin, Analytics, Auth, Fediverse and Install modules in the root modules/ folder - rename ActivityPub to Fediverse
This commit is contained in:
parent
94872f2338
commit
5083cd2fda
268 changed files with 4221 additions and 2186 deletions
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright 2021 Podlibre
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
||||
* @link https://castopod.org/
|
||||
*/
|
||||
|
||||
namespace ActivityPub\Controllers;
|
||||
|
||||
use ActivityPub\WebFinger;
|
||||
use CodeIgniter\Controller;
|
||||
use CodeIgniter\Exceptions\PageNotFoundException;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use Exception;
|
||||
|
||||
class WebFingerController extends Controller
|
||||
{
|
||||
public function index(): ResponseInterface
|
||||
{
|
||||
try {
|
||||
$webfinger = new WebFinger($this->request->getGet('resource'));
|
||||
} catch (Exception) {
|
||||
// return 404, actor not found
|
||||
throw PageNotFoundException::forPageNotFound();
|
||||
}
|
||||
|
||||
return $this->response->setJSON($webfinger->toArray());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue