mirror of
https://github.com/YGGverse/Pulsar.git
synced 2026-03-31 17:55:37 +00:00
resolve static route in priority
This commit is contained in:
parent
1c7e01f028
commit
cf36d79cad
1 changed files with 23 additions and 25 deletions
|
|
@ -78,6 +78,15 @@ class Nex implements MessageComponentInterface
|
|||
// Route request
|
||||
switch (true)
|
||||
{
|
||||
// Try static route settings
|
||||
case isset($this->_config->route->{$request}):
|
||||
|
||||
$response = file_get_contents(
|
||||
$this->_config->route->{$request}
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
// Chanel item
|
||||
case (bool) preg_match('/\/(?<id>\d+)($|\.gmi)$/i', $request, $attribute):
|
||||
|
||||
|
|
@ -207,17 +216,7 @@ class Nex implements MessageComponentInterface
|
|||
// Not found
|
||||
default:
|
||||
|
||||
// Try static route settings
|
||||
if (isset($this->_config->route->{$request}))
|
||||
{
|
||||
$response = file_get_contents(
|
||||
$this->_config->route->{$request}
|
||||
);
|
||||
}
|
||||
|
||||
// Build site map
|
||||
else
|
||||
{
|
||||
// Create site map
|
||||
$lines = [];
|
||||
|
||||
// Get channels
|
||||
|
|
@ -236,7 +235,6 @@ class Nex implements MessageComponentInterface
|
|||
$lines
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Debug message event on enabled
|
||||
if ($this->_config->event->message->debug->enabled)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue